]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
RNV: win32 building.
authorana <ana@opencascade.com>
Fri, 13 Sep 2013 13:35:49 +0000 (13:35 +0000)
committerana <ana@opencascade.com>
Fri, 13 Sep 2013 13:35:49 +0000 (13:35 +0000)
src/VTKViewer/CMakeLists.txt
src/VTKViewer/VTKViewer_PolyDataMapper.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.h

index 66bd40199510a9e967351c23b066cf8f9c693132..b2b96b45d275b259cea0591d1dfa75dd17cb910d 100755 (executable)
@@ -35,7 +35,7 @@ INCLUDE_DIRECTORIES(
 ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS})
 
 # libraries to link to
-SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit)
+SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${KERNEL_SALOMELocalTrace})
 
 # --- headers ---
 
index 4719a6c73419298a48b481ce103975bbc01c150b..6a633216352e41d91c95e88f8663e33870d6ed33 100644 (file)
@@ -69,10 +69,18 @@ vtkStandardNewMacro(VTKViewer_PolyDataMapper);
 #define APIENTRYP APIENTRY *
 #endif
 
+#ifndef GL_ARB_shader_objects
+typedef char GLcharARB;
+#endif
+
 #ifndef GL_VERTEX_PROGRAM_POINT_SIZE_ARB
 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642
 #endif
 
+#ifndef GL_VERTEX_SHADER_ARB
+#define GL_VERTEX_SHADER_ARB              0x8B31
+#endif
+
 #ifndef GL_ARB_point_sprite
 #define GL_POINT_SPRITE_ARB               0x8861
 #define GL_COORD_REPLACE_ARB              0x8862
@@ -95,8 +103,8 @@ typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
 typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
 typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
 typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
-typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
-typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
 typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
 typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
 
@@ -116,7 +124,7 @@ static PFNGLBINDBUFFERARBPROC               vglBindBufferARB               = NUL
 static PFNGLBUFFERDATAARBPROC               vglBufferDataARB               = NULL;
 static PFNGLDELETEBUFFERSARBPROC            vglDeleteBuffersARB            = NULL;
 static PFNGLGETATTRIBLOCATIONARBPROC        vglGetAttribLocationARB        = NULL;
-static PFNGLVERTEXATTRIBPOINTERPROC         vglVertexAttribPointerARB      = NULL;
+static PFNGLVERTEXATTRIBPOINTERARBPROC      vglVertexAttribPointerARB      = NULL;
 static PFNGLENABLEVERTEXATTRIBARRAYARBPROC  vglEnableVertexAttribArrayARB  = NULL;
 static PFNGLDISABLEVERTEXATTRIBARRAYARBPROC vglDisableVertexAttribArrayARB = NULL;
 
@@ -188,7 +196,7 @@ bool InitializeBufferExtensions()
   if( !vglGetAttribLocationARB )
     return false;
 
-  vglVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERPROC)GL_GetProcAddress( "glVertexAttribPointer" );
+  vglVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC)GL_GetProcAddress( "glVertexAttribPointer" );
   if( !vglVertexAttribPointerARB )
     return false;
 
@@ -952,7 +960,7 @@ int VTKViewer_PolyDataMapper::Draw( vtkRenderer* ren, vtkActor* act )
 
          attribute_diams = vglGetAttribLocationARB(this->VertexProgram, "diameter");
          vglEnableVertexAttribArrayARB(attribute_diams);
-         vglBindBufferARB(GL_ARRAY_BUFFER, aDiamsID);
+         vglBindBufferARB(GL_ARRAY_BUFFER_ARB, aDiamsID);
          vglVertexAttribPointerARB(
                                    attribute_diams,   // attribute
                                    1,                 // number of elements per vertex, here (diameter)
index d7e3783105c16bc14c60eb11cd2a34422a0c1979..6702b7d8d739a0ac1e18b938936aecd53418e0f0 100644 (file)
@@ -43,6 +43,11 @@ class vtkImageData;
 #define MAPPER_SUPERCLASS vtkMesaPolyDataMapper
 #endif
 
+#ifndef GL_ARB_shader_objects
+typedef GLuint GLhandleARB;
+#endif
+
+
 //----------------------------------------------------------------------------
 //! OpenGL Point Sprites PolyData Mapper.
 /*!