so what my code does
a) I render the teapot to FBO 1 (in HDR)
b) I render with a tonemapping pass to FBO 2
c) I draw a quad with the info from the FBO

Now I have an angle variable at the drawing of the quad and if I press 4 or 6 on my keyboard the angle changes. And so does the avg luminance of the image so it's actually being rotated but this rotation does not show on the screen. Anyone any idea why the updated buffer is not drawn to the screen?

The glDisable(GL_DEPTH) is incorrect, it should be glDisable(GL_DEPTH_TEST). Because of this, the depth test is still enabled during the quad drawing. The default depth function is GL_LESS so only the first quad render will succeed during the depth test.

Zarathustra

12-08-2007, 05:38 AM

Great, thanks alot!

I've been trying to solve this for over a week and something this trivial :)

plasmonster

12-08-2007, 06:08 AM

It's a good idea to call glGetError every now and again to catch pesky mistakes like that one. You can use gluErrorString to convert the returned enum to a string suitable for printing to the console.

tamlin

12-10-2007, 07:25 AM

As for GetError, something that's served me well over the years is a macro I wrap every GL call (that can set GL error) that after every GL call automatically also calls GlError and asserts if it fails. Sure, it slows the rendering path down a little but it really can save the behing when things goes south.

For an idea you could try something like the following (add another set of {} if plain C)
#define YOUR_CHECKNAME(GL_CALL) { GL_CALL; const GLenum err = glGetError(); assert(err == GL_NO_ERROR); }
that way you also get to see the error code in the debugger if/when the assert triggers.