[GEM-dev] Gem vs ATi fglrx vs GLEW vs OpenGL 2.0

cyrille henry cyrille.henry at la-kitchen.fr
Mon Jan 7 11:51:23 CET 2008



Claude Heiland-Allen a écrit :
> Hi all,
> 
> I found this:
> 
> http://ati.cchtml.com/show_bug.cgi?id=193
> 
> I ran the test program attached to that bug report, it reported success.
> 
> But Gem (without "--with-glversion=1.5") still fails to load with
> glUniform2i undefined.
> 
> Then I tried some semi-random hacking of code:
> 
> #include <GL/glew.h> // just before #include <GL/gl.h> in Base/GemGL.h
> 
> and adding -lGLEW to the Make.config (iirc).
> 
> Gem now compiles without error and loads without error, but segfaults in
> numerous situations, including plain texturing (gdb indicates jumping to 
> a null pointer).
> 
> The key function in the OpenGL 2.0 tester seems to be:
> 
> typedef void (*__GLXextFuncPtr)(void);
> extern "C" __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
> 
> which is only referenced in:
> 
> pd-gem/Gem/src/Base/glxew.h
> pd-gem/Gem/src/Base/glew.cpp
> 
> I noticed glewInit() is only called on Windows:
> 
> pd-gem/Gem/src/Base/GemWinCreateNT.cpp:  GLenum err = glewInit();
> 
> So I hacked something in GemWinCreateXWin.cpp:
> 
> #ifdef USE_GLEW
>    GLenum err = glewInit();
>    if (GLEW_OK != err) error("failed to init GLEW");
>    else post("GLEW version %s",glewGetString(GLEW_VERSION));
> #endif
> 
> and added #include <GL/glew.h> in GemWinCreate.h, and I got a Gem that 
> compiled and loaded without errors, no segfaults so far either, but also 
> no working shaders:
> 
> Direct Rendering enabled!
> GLEW version 1.3.4
> GEM: Start rendering
> linking: link 1.07374e+09 0
> linking: link 1.07374e+09 5.36871e+08
> [glsl_program]: Info_log:
> [glsl_program]:  Link successful. There are no attached shader objects.
> [pix_image]: GEM: thread loaded image: 
> /home/claude/src/pd-gem/Gem/examples/10.glsl/img3.jpg
> GL: invalid value
> 
> With 02_primitive_distortion.pd I get an undistorted textured sphere, 
> similarly the other examples (everything looks like no special shaders 
> are running).
> 
> The large numbers for the shader ids look a bit suspicious to me, as 
> does the "no attached shader objects".  Would be useful if "GL: invalid 
> value" could be made more verbose, too.
> 
> So, any clues?

i remember a problem i had once with long shader id.
the Id was to long, pd converted it to exponentian notation (1234e+7), so some precision was lost. linking was not possibile.
it was also on linux + fglrx driver.
i did not use this computer for long time, so i made a very quick and very dirty workaround : i changed gem code to split the number in 2 diferents number, and then linkng was possible.
i don't know a good solution for this problem.


i don't know if you've got the same problem, but hope it could help

cyrille


> 
> Some more info from Pd:
> 
> [glsl_vertex]: Vertex_shader Hardware Info
> [glsl_vertex]: ============================
> [glsl_vertex]: MAX_VERTEX_ATTRIBS: 32
> [glsl_vertex]: MAX_VERTEX_UNIFORM_COMPONENTS_ARB: 4096
> [glsl_vertex]: MAX_VARYING_FLOATS: 44
> [glsl_vertex]: MAX_COMBINED_TEXTURE_IMAGE_UNITS: 16
> [glsl_vertex]: MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0
> [glsl_vertex]: MAX_TEXTURE_IMAGE_UNITS: 16
> [glsl_vertex]: MAX_TEXTURE_COORDS: 8
> [glsl_fragment]: glsl_fragment Hardware Info
> [glsl_fragment]: ============================
> [glsl_fragment]: MAX_FRAGMENT_UNIFORM_COMPONENTS: 4096
> [glsl_fragment]: MAX_TEXTURE_COORDS: 8
> [glsl_fragment]: MAX_TEXTURE_IMAGE_UNITS: 16
> [glsl_program]: glsl_Program Hardware Info
> [glsl_program]: ============================
> [glsl_program]:
> 
> I'm running Debian Stable with ATi proprietary fglrx driver for a 
> Mobility Radeon 9700 card.
> 
> 
> Thanks,
> 
> 
> Claude




More information about the GEM-dev mailing list