View Full Version : Why my program only works on 8178 nVidia driver?
09-12-2006, 06:37 AM
I've written a program that uses GPU capabilities to compute some generic data. It was working well on 8178 driver, but when I upgraded the driver it stopped working. I'm using glDrawBuffers (with COLOR_ATTACHMENT 0 and 1) and the shader writes back the computed data in gl_FragData and . The problem is that all my returned data are zero when I use both framebuffers. But when I test it using only one framebuffer (with gl_FragColor or gl_FragData) the returned data are OK.
I've tried all the newest drivers: 8756, 8762 and 8774; but none of them have worked. My machine is a Pentium IV 2.8 GHz and 1 GB of RAM with GeForce 6600. I'm using Linux (Fedora Core 5), OpenGL 2.0 and the shader was written in GLSL.
Thanks in advance,
09-12-2006, 08:54 AM
I had run into the same problem a while back in a program I wrote for Windows that used Framebuffer Objects. I forget exactly what the problem was, however I think it had something to do with the texture format that I was attaching to the FBO. Linear filtering was not supported with 32-bit floating point textures and the program wouldn't do anything. I've never had those problems on linux though (with Ubuntu) but check and see if changing the texture format and/or filtering modes helps.
If you happened to use single-channel textures, the reason might be that some of the past NVIDIA drivers supported rendering to a texture of format GL_LUMINANCE32F_ARB, although it is clearly against the current FBO spec. At the moment, only RGB and RGBA textures are supported as color attachments.
The given reason for not allowing rendering to luminance textures is said to be simply because of the ambiguity of which GLSL notation should be used, gl_FragData.r or gl_FragData.rgb or what.
The ARB / Khronos Group is going to add two new internal formats GL_R*_ARB and GL_RG*_ARB in the upcoming GL_ARB_framebuffer_object extension (year 2007?).
If this described your problem situation, you have three options to choose from:
to make it work right away, use GL_TEXTURE_RECTANGLE_ARB with one of the GL_FLOAT_*_NV formats (and deal with the [0,w]x[0,h] texcoords), see GL_NV_float_buffer (http://www.opengl.org/registry/specs/NV/float_buffer.txt) wait for the GL_ARB_fbo to come, or ask the Superbuffers WG to release the GL_EXT_fbo2 extension with new R/RG formats ;) (see Superbuffer WG Update in SIGGRAPH 2006 - OpenGL BOF Presentations (http://www.khronos.org/developers/library/siggraph2006/OpenGL_BOF/) )
Hope this helps.
09-13-2006, 12:41 AM
Another possibility would be to use a single RGB float texture instead of two R textures. This uses 50% more memory, but it works ;)
09-14-2006, 02:33 PM
I'm rendering to 2 FBOs attached to 4-channel (RGBA) textures. However I need to store a 32-bit float in each channel of the outputted textures. For that I use the GL_RGBA32F_ARB texture type. The dimension of my textures doesn't need to be rectangular, so I use the GL_TEXTURE_2D format.
I try to use GL_TEXTURE_RECTANGLE_ARB with the GL_FLOAT_RGBA32_NV format (dealing with non-clamped dimension), but the result is the same: a blank screen.
09-16-2006, 07:45 PM
if you try to use GL_TEXTURE_RECTANGLE_ARB,in fragment shader you should use f4texRECT instead of tex2D with integer texture coords.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.