Integet texture with fbo

Hi all,

Have anyone tried using integer texture with fbo? When I try to do that, glCheckFramebufferStatus reports error of GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT.


driver                  : WinVista 185.85
OpenGL Vendor		: NVIDIA Corporation
OpenGL Renderer		: GeForce 8800 GTS 512/PCI/SSE2
OpenGL Version		: 3.0.0
OpenGL Shader Version	: 1.30 NVIDIA via Cg compiler


glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32I, 
texWidth, texHeight, 0, GL_RGBA, GL_INT, NULL);

Try that one call, it follows spec more:

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32I_EXT,
texWidth, texHeight, 0, GL_RGBA_INTEGER_EXT, GL_INT, NULL);

Looks like your texture is incomplete somehow.

Yes, you are right. Thanks!

You’re welcome!
I’m also often messing up with these formats/internal formats, especially for FP targets :slight_smile: