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?
jra101
December 2, 2005, 7:52pm
2
Type parameter needs to be GL_UNSIGNED_INT_24_8_EXT.
sqrt_1
December 2, 2005, 11:47pm
3
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…
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 =/
jra101
December 3, 2005, 9:03am
7
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