PDA

View Full Version : Color clamping on ATI



Aekold
07-23-2008, 06:07 AM
Hi,
I use
glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, FALSE);
glClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, FALSE);
glClampColorARB(GL_CLAMP_READ_COLOR_ARB, GL_FALSE);
to avoid color clamping, but this doesn't work on ATI GPUs (program crashes on the corresponding line). Which extensions should I use on ATI video cards?
Thanks,
Peter

Zengar
07-23-2008, 08:32 AM
As far as I know, there are no alternatives to ARB_color_buffer_float. But you may be interested in this: http://www.geeks3d.com/?p=375

overlay
07-23-2008, 09:23 AM
Program crashes? Did you check what the value of your function
pointer glClampColorARB? Is it not null, aka initialized correctly?

Aekold
07-23-2008, 10:07 AM
Program crashes? Did you check what the value of your function
pointer glClampColorARB? Is it not null, aka initialized correctly?

This code works on nVidia and crashes on ATI, that's for sure. So, pointer should be OK.

overlay
07-23-2008, 10:37 AM
No. You are supposed to check first if GL_ARB_color_buffer_float is supported before using it. You can call glGetString(GL_EXTENSIONS) (remember you can only make OpenGL calls if you have a valid current OpenGL context for your current thread) and parse its result or use another library that does the job for you (like glew).

The second part is to load the function pointer with a platform specific function from glx or glw or ... (or again let glew do the job for you). Once the function pointer is initialized, you can use it.

To check quickly for available extensions on a system:
* on Linux: glxinfo
* on Windows: You can download and use GLview http://www.realtech-vr.com/glview
* on Mac OS X, With Xcode installed, go to Macintosh HD->Developer->Applications->Graphic Tools->OpenGL Driver Monitor.app->Monitors->Renderer Info-><name of the OpenGL driver>->OpenGL Extensions

innuendo
07-24-2008, 01:24 AM
Hi,
I use
glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, FALSE);
glClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, FALSE);
glClampColorARB(GL_CLAMP_READ_COLOR_ARB, GL_FALSE);
to avoid color clamping, but this doesn't work on ATI GPUs (program crashes on the corresponding line). Which extensions should I use on ATI video cards?
Thanks,
Peter

What card and driver?

Aekold
08-04-2008, 04:26 AM
Extension is not supported by this card (due to GLView utility). GPU is Radeon X1800, I've tried the last Catalyst drivers. Can you recommend me any alternative extensions?
Thanks,
Peter

innuendo
08-05-2008, 03:47 AM
Extension is not supported by this card (due to GLView utility). GPU is Radeon X1800, I've tried the last Catalyst drivers. Can you recommend me any alternative extensions?
Thanks,
Peter

As far as I know, there are no alternatives to ARB_color_buffer_float :)

Check extensions list. I think something is wrong.