From: ana Date: Fri, 13 Sep 2013 13:35:49 +0000 (+0000) Subject: RNV: win32 building. X-Git-Tag: BR_hydro_v_0_3_1~63 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b775919a5a2de4fb63418361d125ca609310bca4;p=modules%2Fgui.git RNV: win32 building. --- diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index 66bd40199..b2b96b45d 100755 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -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 --- diff --git a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx index 4719a6c73..6a6332163 100644 --- a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx +++ b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx @@ -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) diff --git a/src/VTKViewer/VTKViewer_PolyDataMapper.h b/src/VTKViewer/VTKViewer_PolyDataMapper.h index d7e378310..6702b7d8d 100644 --- a/src/VTKViewer/VTKViewer_PolyDataMapper.h +++ b/src/VTKViewer/VTKViewer_PolyDataMapper.h @@ -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. /*!