> glCreateShader is initialized by Load_GL_version_2_0 (also, > higher Load_GL_version_x_x call Load_GL_version_2_0). > > Ludo: Are you sure you have OpenGL 2.1? Some OpenGL > implementations unfortunately lie, claiming in > glGetString(GL_VERSION) that they support higher version than > in reality. You can try adding > Writeln(Load_GL_version_2_0) into any OpenGL example program, > and you will probably see that it answers false. For example, > you can add > Writeln(Load_GL_version_2_0) inside the FPC demo > packages/opengl/examples/glutdemo.pp, near the other writelns. >
Apparently it is an incomplete 2.1: glBlendEquationSeparate isn't defined and Load_GL_version_2_0 exits immediately. I checked all others up to glCreateShader and they are present (nm -D /usr/lib/mesa/libGL.so.1.2). I made a local copy of glext.pp and commented the lines that load and check the address of glBlendEquationSeparate and the example runs now. There is a message "fragment shader compile failed" though. The all or nothing approach in Load_GL_version_X_Y (all functions are present or fail) is simple but has its disadvantages when working with third party libraries. Fe Synapse uses a more elaborate method of loading functions at runtime. It defines for every function a wrapper that checks if the function pointer is assigned and then calls it or raises a meaningfull exception. Ludo -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus