Floating Point FrameBufferObjects
We're having some troubles using floating point textures. All we get is total whiteness. We're using a shader which at the moment only sets the color to red. If we use GL_RGBA8 as internal format and GL_UNSIGNED_BYTE as external we get the intended result. Btw, we have an NV-machine.
//Creates objects
glGenFramebuffersEXT(1, &m_frameBuffer);
glGenRenderbuffersEXT(1, &m_depthRenderBuffer);
glGenTextures(4, m_fboTextures);
//Initializes textures
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, m_fboTextures[0]);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_FLOAT_RGBA16_NV, m_fboTextureSizeX, m_fboTextureSizeY, 0, GL_RGBA, GL_FLOAT, NULL);
//Binds buffers and make attachments
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_frameBuffer);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_ARB, m_fboTextures[0], 0);
Well, it says GL_FRAMEBUFFER_COMPLETE_EXT as it should. We use 4 different color attachments, could that impose a problem? All of them have identical parameters.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement