X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVTKViewer%2FVTKViewer_OpenGLHelper.cxx;h=7be1e8b881118421892446653afad00de0739e17;hb=refs%2Fheads%2Fngr%2Fpython3_dev_pv5.4;hp=b92c14dc9f2efd0ff8efff3f71132e9b583978a4;hpb=65e02990cc881c70c156195c160921009e4a5f87;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_OpenGLHelper.cxx b/src/VTKViewer/VTKViewer_OpenGLHelper.cxx index b92c14dc9..7be1e8b88 100644 --- a/src/VTKViewer/VTKViewer_OpenGLHelper.cxx +++ b/src/VTKViewer/VTKViewer_OpenGLHelper.cxx @@ -205,7 +205,7 @@ void VTKViewer_OpenGLHelper::Init() return; } -namespace +namespace GUI_OPENGL { char* readFromFile( std::string fileName ) { @@ -257,7 +257,7 @@ bool VTKViewer_OpenGLHelper::CreateShaderProgram (const std::string& theFilePath // Create vertex shader. fileName = theFilePath + ".vs.glsl"; - shaderContent = readFromFile (fileName); + shaderContent = GUI_OPENGL::readFromFile (fileName); theVertexShader = vglCreateShaderObjectARB (GL_VERTEX_SHADER_ARB); vglShaderSourceARB (theVertexShader, 1, (const GLcharARB**)&shaderContent, NULL); @@ -281,7 +281,7 @@ bool VTKViewer_OpenGLHelper::CreateShaderProgram (const std::string& theFilePath // Create fragment shader. fileName = theFilePath + ".fs.glsl"; - shaderContent = readFromFile (fileName); + shaderContent = GUI_OPENGL::readFromFile (fileName); theFragmentShader = vglCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB); vglShaderSourceARB (theFragmentShader, 1, (const GLcharARB**)&shaderContent, NULL); @@ -349,6 +349,7 @@ void VTKViewer_OpenGLHelper::DestroyShaderProgram (GLhandleARB theProgram, // function : SetUniformMatrix // purpose : // ============================================================================ +#ifdef VTK_OPENGL2 void VTKViewer_OpenGLHelper::SetUniformMatrix (const GLint theLocation, const vtkMatrix4x4* theMatrix) const { @@ -360,3 +361,4 @@ void VTKViewer_OpenGLHelper::SetUniformMatrix (const GLint theLocation, this->vglUniformMatrix4fvARB (theLocation, 1, GL_FALSE, data); } +#endif