Help me fix glCreateProgram Error, Please!

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
“);
if ( programObject == 0 )
{
printf(”-----------------> 3
");
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.

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?

[QUOTE=Agent D;1263803]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?[/QUOTE]

I try to find error by this code:

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

", err);

but ther err return 0; // GL_NO_ERROR = 0

help me, please!

Are you sure you have a valid context?

Check whether


   esInitContext ( &esContext );

and


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

return successfully.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.