}
#endif
+#include <dlfcn.h>
+
#include <stdio.h>
#include <cmath>
#include <string>
-#define ARB_PROGRAM
-
#ifndef VTK_IMPLEMENT_MESA_CXX
vtkCxxRevisionMacro(VISU_OpenGLPointSpriteMapper, "$Revision$");
vtkStandardNewMacro(VISU_OpenGLPointSpriteMapper);
glProgramStringARB( GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
size, shader );
-
/*
- cout << "Shader :" << endl;
+ cout << "Shader from " << fileName << endl;
for( int i = 0; i < size; i++ )
cout << shader[i];
cout << endl;
return;
}
+ void* libHandle = dlopen( "libGL.so", RTLD_NOW );
+
+ glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC)dlsym( libHandle, "glGenProgramsARB" );
+ glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC)dlsym( libHandle, "glDeleteProgramsARB");
+ glBindProgramARB = (PFNGLBINDPROGRAMARBPROC)dlsym( libHandle, "glBindProgramARB");
+ glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)dlsym( libHandle, "glProgramStringARB");
+ glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC)dlsym( libHandle, "glProgramEnvParameter4fARB");
+
+ /*
glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC)glXGetProcAddressARB((const GLubyte*)"glGenProgramsARB");
glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC)glXGetProcAddressARB((const GLubyte*)"glDeleteProgramsARB");
glBindProgramARB = (PFNGLBINDPROGRAMARBPROC)glXGetProcAddressARB((const GLubyte*)"glBindProgramARB");
glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)glXGetProcAddressARB((const GLubyte*)"glProgramStringARB");
glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC)glXGetProcAddressARB((const GLubyte*)"glProgramEnvParameter4fARB");
+ */
initShader();
setShaderConstants();
glEnable( GL_VERTEX_PROGRAM_ARB );
- glColor4f( 1.0, 1.0, 1.0, 1.0 );
+ //glColor4f( 1.0, 1.0, 1.0, 1.0 );
glBindProgramARB( GL_VERTEX_PROGRAM_ARB, shaderId );