View Full Version : Pixel Shader Initialization Failed

01-09-2004, 08:30 AM
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)");

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.

01-09-2004, 08:54 AM
A 8500 doesn't support the ARB_fragment_program extension so cgGLGetLatestProfile will return CG_PROFILE_UNKNOWN.

01-09-2004, 08:54 AM
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.

01-09-2004, 09:03 AM
So what is the solution for me?

01-09-2004, 09:09 AM
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).

01-09-2004, 09:14 AM
Do U know any good tutorials on this extension? Simple specification say me nothing http://www.opengl.org/discussion_boards/ubb/smile.gif
Oh, iots not that hard as i tought http://www.opengl.org/discussion_boards/ubb/smile.gif Extension specs rule!

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