Pixel Shader Initialization Failed

Im using Shaders with OpenGL through nvidia’s cg library. When initializing the pixel shader profile, it returns with the invalid profile error. Here is the init:

cgContext = cgCreateContext();//ok

creating a Vertex Shader profile and Program, went ok

cgPixelProfile = cgGLGetLatestProfile(CG_GL_FRAGMENT);
if (cgPixelProfile == CG_PROFILE_UNKNOWN)
{
//this error occurs
GEngine_SendErrorMsg(“Invalid Profile Type (PS)”);
exit(0);
}

My program runs on a Radeon9700 perfectly, but on my Radeon8500 fails. Could somebody help? Im quite new in shader programming, and not everything is clear about shader versions, profiles, compability, etc.

CG does not support fragment shaders on Radeon 8500. It probably supports some simple shaders on GeForce3/4, through the NVIDIA register combiner extension, but for obvious reasons they didn’t write support for the ATI texture shader extension.

A 8500 doesn’t support the ARB_fragment_program extension so cgGLGetLatestProfile will return CG_PROFILE_UNKNOWN.

So what is the solution for me?

On a Radeon 8500 you have to use ATI_fragment_shader. AFAIK, Cg doesn’t have a profile for it and won’t unless ATI writes one (which they certainly won’t).

Do U know any good tutorials on this extension? Simple specification say me nothing
Oh, iots not that hard as i tought Extension specs rule!

[This message has been edited by orbano (edited 01-09-2004).]