PDA

View Full Version : NV3X and FBO floating point texture



Brainter
11-03-2005, 11:27 PM
I am using nv36 GPU and want to get 32bit floating texture. GL_FRAMEBUFFER_UNSUPPORTED_EXT was reported. I used floating buffer of nv before. Is there any way to implement unclamped floating texture in FBO on nv36 GPU?

Trahern
11-04-2005, 12:45 AM
Originally posted by Brainter:
I am using nv36 GPU and want to get 32bit floating texture. GL_FRAMEBUFFER_UNSUPPORTED_EXT was reported. I used floating buffer of nv before. Is there any way to implement unclamped floating texture in FBO on nv36 GPU?You have to use GL_FLOAT_RGBA32_NV as internal format for the texuture. This format also works only when the texture target is GL_TEXTURE_RECTANGLE_ARB ( or the rectangle extension from nVidia ).
If you created the texture with these params then there should be no problem attaching this texture to the framebuffer object

Brainter
11-04-2005, 10:14 PM
Thank you Trahern! I have solved the problem.

glTexImage2D(GL_TEXTURE_RECTANGLE_NV,0, GL_FLOAT_RGBA32_NV, texWidth, texHeight,0,GL_RGB, GL_UNSIGNED_BYTE, NULL);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_RECTANGLE_NV, tex.grid0, 0);

can also work well!