PDA

View Full Version : Help me fix glCreateProgram Error, Please!



viet_dtvt_bkdn
01-15-2015, 06:14 PM
I use fedora 20, when kernel 3.16 my OpenGL work well, but when i update my linux 3.17 the OpenGL not work.
I find this error:

C++ code:
// Create the program object
programObject = glCreateProgram ( );
printf("-----------------> 2 \n");
if ( programObject == 0 )
{
printf("-----------------> 3 \n");
return 0;
}
The glCreateProgram return 0 make my program die, but i don't know how to fix, if you know plesae help me fix it.
my source attach bellow, you can run it on eclipse or terminal.

Agent D
01-17-2015, 01:40 AM
According to the spec, glCreateProgram returning zero indicates that an error, but I could not find a list of possible errors.
Since it does not have any arguments, my best guess is out of memory? (That would be very strange tough)

What does glError( ) return?

viet_dtvt_bkdn
01-19-2015, 08:39 PM
According to the spec, glCreateProgram returning zero indicates that an error, but I could not find a list of possible errors.
Since it does not have any arguments, my best guess is out of memory? (That would be very strange tough)

What does glError( ) return?

I try to find error by this code:

programObject = glCreateProgram ( );
GLenum err;
err = glGetError();
printf(" err return: %d \n", err);

but ther err return 0; // GL_NO_ERROR = 0

help me, please!

AngryPixelShader
01-22-2015, 03:53 PM
Are you sure you have a valid context?

Check whether



esInitContext ( &esContext );

and


esCreateWindow ( &esContext, "Hello Triangle", 320, 240, ES_WINDOW_RGB );


return successfully.