From: ouv Date: Mon, 4 Sep 2006 12:40:58 +0000 (+0000) Subject: GVIEW12830 X-Git-Tag: V3_2_2pre~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8612bc5c58e7bf7fdbfec85a589e07fbd148a220;p=modules%2Fvisu.git GVIEW12830 --- diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx index 34400600..401ca646 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx @@ -51,6 +51,8 @@ #include #include +#include + #ifndef VTK_IMPLEMENT_MESA_CXX vtkCxxRevisionMacro(VISU_OpenGLPointSpriteMapper, "Revision$"); vtkStandardNewMacro(VISU_OpenGLPointSpriteMapper); @@ -136,24 +138,24 @@ static PFNGLDELETEBUFFERSARBPROC vglDeleteBuffersARB = NULL bool InitializeARB() { - void* OpenGLLibrary = dlopen( "libGL.so", RTLD_LAZY ); - - vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)dlsym( OpenGLLibrary, "glShaderSourceARB" ); - vglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)dlsym( OpenGLLibrary, "glCreateShaderObjectARB" ); - vglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)dlsym( OpenGLLibrary, "glCompileShaderARB" ); - vglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)dlsym( OpenGLLibrary, "glCreateProgramObjectARB" ); - vglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)dlsym( OpenGLLibrary, "glAttachObjectARB" ); - vglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)dlsym( OpenGLLibrary, "glLinkProgramARB" ); - vglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)dlsym( OpenGLLibrary, "glUseProgramObjectARB" ); - vglGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)dlsym( OpenGLLibrary, "glGetObjectParameterivARB" ); - vglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)dlsym( OpenGLLibrary, "glGetInfoLogARB" ); - vglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)dlsym( OpenGLLibrary, "glGetAttribLocationARB" ); - vglVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)dlsym( OpenGLLibrary, "glVertexAttrib1fARB" ); - - vglGenBuffersARB = (PFNGLGENBUFFERSARBPROC)dlsym( OpenGLLibrary, "glGenBuffersARB" ); - vglBindBufferARB = (PFNGLBINDBUFFERARBPROC)dlsym( OpenGLLibrary, "glBindBufferARB" ); - vglBufferDataARB = (PFNGLBUFFERDATAARBPROC)dlsym( OpenGLLibrary, "glBufferDataARB" ); - vglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)dlsym( OpenGLLibrary, "glDeleteBuffersARB" ); + //void* OpenGLLibrary = dlopen( "libGL.so", RTLD_LAZY ); + + vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)glXGetProcAddressARB( (const GLubyte*)"glShaderSourceARB" ); + vglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)glXGetProcAddressARB( (const GLubyte*)"glCreateShaderObjectARB" ); + vglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)glXGetProcAddressARB( (const GLubyte*)"glCompileShaderARB" ); + vglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)glXGetProcAddressARB( (const GLubyte*)"glCreateProgramObjectARB" ); + vglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)glXGetProcAddressARB( (const GLubyte*)"glAttachObjectARB" ); + vglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)glXGetProcAddressARB( (const GLubyte*)"glLinkProgramARB" ); + vglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)glXGetProcAddressARB( (const GLubyte*)"glUseProgramObjectARB" ); + vglGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)glXGetProcAddressARB( (const GLubyte*)"glGetObjectParameterivARB" ); + vglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)glXGetProcAddressARB( (const GLubyte*)"glGetInfoLogARB" ); + vglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)glXGetProcAddressARB( (const GLubyte*)"glGetAttribLocationARB" ); + vglVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)glXGetProcAddressARB( (const GLubyte*)"glVertexAttrib1fARB" ); + + vglGenBuffersARB = (PFNGLGENBUFFERSARBPROC)glXGetProcAddressARB( (const GLubyte*)"glGenBuffersARB" ); + vglBindBufferARB = (PFNGLBINDBUFFERARBPROC)glXGetProcAddressARB( (const GLubyte*)"glBindBufferARB" ); + vglBufferDataARB = (PFNGLBUFFERDATAARBPROC)glXGetProcAddressARB( (const GLubyte*)"glBufferDataARB" ); + vglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)glXGetProcAddressARB( (const GLubyte*)"glDeleteBuffersARB" ); if( vglShaderSourceARB && vglCreateShaderObjectARB &&