Hello, nnexai.
I was having probably the same problem with an application at my office today.
I'm trying to run the app on a laptop with an intel Core i5 and GMA HD graphics, running Windows XP.
Not sure about the graphics driver version because I'm currently writing this at home.
Here's a snippet similar to the code I'm having trouble with:
glGenTextures( 1, &tex );
glBindTexture( GL_TEXTURE_2D, tex );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, tex_w, tex_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0 );
glGenRenderbuffersEXT( 1, &rb );
glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, rb );
glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT, rb_w, rb_h );
glGenFramebuffersEXT( 1, &fb );
glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, fb );
glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex, 0 );
glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rb );
glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rb );
This code works perfectly on other graphics boards I tested: a GeForce 7950 GT, a Quadro FX 4500, and a Radeon HD 4650.
After wrestling with the code for half a day, I decided that I can find an alternative to the stencil attachment for the application.
The GMA HD just didn't seem to want to work with the depth-and-stencil extension.
I think there is a possibility that there's either a bug in the general GMA OpenGL driver's framebuffer module or,
maybe intel's hardware just plain doesn't support it.