[PyOpenGL-Users] Depth buffer attachment problem
Brought to you by:
mcfletch
From: Nicolas R. <Nic...@in...> - 2014-02-24 20:41:07
|
Hi, I'm trying to render a simple rotating textured cube to a texture using framebuffer. I attached a RGB texture for the color buffer and a depth render buffer for the depth buffer to the framebuffer (same 512x512 resolution for each of them). I checked for the status of the framebuffer which report itself as "complete". Nonetheless I get a weird rendering as shown on second image: Direct rendering (without framebuffer): http://www.loria.fr/~rougier/tmp/without-fbo.png Indirect rendering (with framebuffer): http://www.loria.fr/~rougier/tmp/with-fbo.png First image is direct rendering (no framebuffer) and is ok. Second image is indirect rendering (rendering to texture then displaying the texture, the left washed-out part is ok, it comes from the fragment shader for testing purposes). I suspect the depth buffer is not really attached but I did not get any error along the way. I'm using python (2.7.6), pyopengl (3.0.2) on osx and I'm using framebuffer operations from the main pyopengl namespace (OpenGL.GL) but I know OpenGL.GL.ext.framebuffer_object is also available. Could this be the reason ? I cannot provide a simple example since the example comes from a project (vispy). If anyone have a simple glut based example showing framebuffer rendering (with depth buffer) such as cube rendered on cube, that could help. Nicolas |