From afb477675409bb818d45089edfb78c8788c29369 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 19 Feb 2009 13:21:38 +0000 Subject: [PATCH] Made FBO's on linux work again --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 9 +++------ panda/src/glxdisplay/glxGraphicsPipe.cxx | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 252ddb61ec..55fad081a4 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -227,7 +227,7 @@ rebuild_bitplanes() { Texture *attach[RTP_COUNT]; attach[RTP_color] = 0; - attach[RTP_depth] = 0; + //attach[RTP_depth] = 0; attach[RTP_depth_stencil] = 0; for (int i=0; i<_fb_properties.get_aux_rgba(); i++) { attach[RTP_aux_rgba_0+i] = 0; @@ -270,7 +270,7 @@ rebuild_bitplanes() { // For all slots, update the slot. - bind_slot(rb_resize, attach, RTP_depth, GL_DEPTH_ATTACHMENT_EXT); + //bind_slot(rb_resize, attach, RTP_depth, GL_DEPTH_ATTACHMENT_EXT); bind_slot(rb_resize, attach, RTP_depth_stencil, GL_DEPTH_ATTACHMENT_EXT); bind_slot(rb_resize, attach, RTP_color, GL_COLOR_ATTACHMENT0_EXT); int next = GL_COLOR_ATTACHMENT1_EXT; @@ -493,10 +493,7 @@ bind_slot(bool rb_resize, Texture **attach, RenderTexturePlane slot, GLenum atta GL_RENDERBUFFER_EXT, rb); } } else { - GLenum internal_format; - - internal_format = glgsg -> get_internal_image_format(tex); - glgsg->_glRenderbufferStorage(GL_RENDERBUFFER_EXT, internal_format, + glgsg->_glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_RGBA8_EXT, _rb_size_x, _rb_size_y); glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, 0); glgsg->_glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, attachpoint, diff --git a/panda/src/glxdisplay/glxGraphicsPipe.cxx b/panda/src/glxdisplay/glxGraphicsPipe.cxx index 5eb42b1752..33b4ace079 100644 --- a/panda/src/glxdisplay/glxGraphicsPipe.cxx +++ b/panda/src/glxdisplay/glxGraphicsPipe.cxx @@ -242,9 +242,8 @@ make_output(const string &name, // Second thing to try: a GLGraphicsBuffer if (retry == 1) { - if ((!support_rtt)|| + if ((host==0)|| // (!gl_support_fbo)|| - (host==0)|| ((flags&BF_require_parasite)!=0)|| ((flags&BF_require_window)!=0)) { return NULL;