Hello, I'm new here.
I'm starting with Cg. I have made a couple of things with it and OpenGL.
Everyting ok until now. I was trying to run an example of the book "The Cg Tutorial", but I can't execute it properly.
The Cg program creates a Double Vision Effect using a Vertex and a Fragment Program. The VP and FP compile well (I'm using ARBVP1 & ARBFP1 profiles. My graphic card is an ATI Mobility Radeon 9700). But when I try to load the Vertex Program, the Cg compiler says me that "the program couldn't be loaded".
This is the code:
I don't know what is happening. I have used the ARBVP1 profile before whitout problems.
By the way, I tried to install CgFX Viewer yesterday, but I wasn't able to do it. Whe the installation began, an error appeared. It said something about the CgFXParser.dll. It seemed that I had the 0.0.1.5 version and I need a previous one (0.0.0.4 or something). Where I can find this?
Thanks
I'm starting with Cg. I have made a couple of things with it and OpenGL.
Everyting ok until now. I was trying to run an example of the book "The Cg Tutorial", but I can't execute it properly.
The Cg program creates a Double Vision Effect using a Vertex and a Fragment Program. The VP and FP compile well (I'm using ARBVP1 & ARBFP1 profiles. My graphic card is an ATI Mobility Radeon 9700). But when I try to load the Vertex Program, the Cg compiler says me that "the program couldn't be loaded".
This is the code:
Code:
static void LoadCgPrograms(){
assert(cgIsContext(context));
// Cargamos y compilamos el VP
vertexProgram = cgCreateProgramFromFile(context, CG_SOURCE, CWD "Shaders/DoubleVisionVP.cg",
vertexProfile, NULL, NULL);
if (!cgIsProgramCompiled(vertexProgram))
cgCompileProgram(vertexProgram);
-------------------------------------------------------------------------------
// Activamos el VP
cgGLLoadProgram(vertexProgram); //Here is where it fails
cgGLEnableProfile(vertexProfile); //Vertex Profile --> ARBVP1
--------------------------------------------------------------------------------
// De igual forma tenemos que hacerlo para los FP
fragmentProgram = cgCreateProgramFromFile(context, CG_SOURCE, CWD "Shaders/DoubleVisionFP.cg",
fragmentProfile, NULL, NULL);
if (!cgIsProgramCompiled(fragmentProgram))
cgCompileProgram(fragmentProgram);
cgGLLoadProgram(fragmentProgram);
cgGLEnableProfile(fragmentProfile);
}
I don't know what is happening. I have used the ARBVP1 profile before whitout problems.
By the way, I tried to install CgFX Viewer yesterday, but I wasn't able to do it. Whe the installation began, an error appeared. It said something about the CgFXParser.dll. It seemed that I had the 0.0.1.5 version and I need a previous one (0.0.0.4 or something). Where I can find this?
Thanks