FBO woes (DEPTH_STENCIL_EXT)

        glBindTexture(GL_TEXTURE_2D,  depthStencil);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);

        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT,
                     width, height, 0, GL_RGBA, GL_INT, NULL);

Using that piece of code, glTexImage2D returns GL_INVALID_OPERATION =/
Anybody got that to work with FBOs?

Type parameter needs to be GL_UNSIGNED_INT_24_8_EXT.

If that is true, someone needs to update the example code at:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/packed_depth_stencil.txt

As what he is doing seems ezactly like the given example…

Originally posted by jra101:
Type parameter needs to be GL_UNSIGNED_INT_24_8_EXT.
Believe me I already tried that and the error persisted =/

Hey JavaCoolDude, what hardware is it on? I am curious… I don’t have an answer but would be nice to know to see if all ATI or Nvidia people are having this issue.

GF6600GT using the 81.95 drivers =/

You also need to change the format parameter to GL_DEPTH_STENCIL_EXT. Something like this:

glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT, width, height, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT);

I believe the examples in the spec have been fixed but an updated version hasn’t been uploaded to the extension registry yet.

Actually that fixed it =D