PDA

View Full Version : Integet texture with fbo



LangFox
05-21-2009, 04:31 AM
Hi all,

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

System:


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


Texture:


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

Jackis
05-21-2009, 07:06 AM
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.

LangFox
05-21-2009, 07:25 PM
Yes, you are right. Thanks!

Jackis
05-21-2009, 11:42 PM
You're welcome!
I'm also often messing up with these formats/internal formats, especially for FP targets :)