I developed some really simple fragment and vertex shader (just a color mapping) and integrated it into an application via glUseProgram.
Testing this on my machine, which has an ATI HD 2600 XT works perfectly.
But when I tried this on our machines with NVIDIA GFX cards ( 7900 as far as I know) the glUseProgram returns the 1281 error. Which is the 0501 hex error code and means GL_INVALID_VALUE.
I checked the value of the program, same on both machines. the code is really simple, and the error description of open gl is less then helpful:
Quote:GL_INVALID_VALUE is generated if
program is neither 0 nor a value
generated by OpenGL.
The glCreateProgram() creates a program for me, so I have no idea, why it does not use it.
_vId = glCreateShader(GL_VERTEX_SHADER); // value: 1
_fId = glCreateShader(GL_FRAGMENT_SHADER); // value: 2
{
const char* arr = _vertexShader.c_str();
glShaderSource(_vId,1, &arr,NULL);
glCompileShader(_vId);
}
{
const char* arr = _fragmentShader.c_str();
glShaderSource(_fId,1, &arr,NULL);
glCompileShader(_fId);
}
_program = glCreateProgram(); // value: 3
glAttachShader(_program,_vId);
glAttachShader(_program,_fId);
glLinkProgram(_program);
// no error returned from opengl here
glUseProgram(_program); // still value: 3, created by opengl