From 8255b59e91c60c5229c8eeda10412a61e835e4a5 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 9 Jan 2014 13:45:54 +0000 Subject: [PATCH] Small corrections. --- src/VTKViewer/VTKViewer_PolyDataMapper.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx index 58fbc4d16..922a0a4d8 100644 --- a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx +++ b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx @@ -147,7 +147,6 @@ static PFNGLDISABLEVERTEXATTRIBARRAYARBPROC vglDisableVertexAttribArrayARB = NUL bool InitializeBufferExtensions() { - vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)GL_GetProcAddress( "glShaderSourceARB" ); if( !vglShaderSourceARB ) return false; @@ -255,6 +254,7 @@ VTKViewer_PolyDataMapper::VTKViewer_PolyDataMapper() this->MarkerScale = VTK::MS_NONE; this->MarkerId = 0; this->BallEnabled = false; + this->VertexProgram = 0; } //----------------------------------------------------------------------------- @@ -543,7 +543,7 @@ void VTKViewer_PolyDataMapper::RenderPiece( vtkRenderer* ren, vtkActor* act ) this->InitTextures(); } - if(!this->BallEnabled) { + if(!this->BallEnabled || this->ExtensionsInitialized != ES_Ok) { MAPPER_SUPERCLASS::RenderPiece( ren, act ); if( isUsePointSprites ) this->CleanupPointSprites(); @@ -982,7 +982,7 @@ int VTKViewer_PolyDataMapper::Draw( vtkRenderer* ren, vtkActor* act ) vglDeleteBuffersARB( 2, &aDiamsID ); } - } else { // there are no extensions + } else { // there are no extensions glColorPointer( 4, GL_FLOAT, sizeof(VTK::TVertex), aVertexArr ); glVertexPointer( 3, GL_FLOAT, sizeof(VTK::TVertex), (void*)((GLfloat*)((void*)(aVertexArr)) + 4)); -- 2.39.2