Salome HOME
updated copyright message
[modules/gui.git] / src / VTKViewer / VTKViewer_Texture.cxx
index c6faba0b19e009aaeccf64bc1e0a7a1333969567..eb82eedfc9d803f7c366560f07adfd3164ae63c9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #include "vtkOpenGLRenderWindow.h"
 #include "vtkTransform.h"
 #include "vtkPixelBufferObject.h"
-#include "vtkOpenGL.h"
+#include "vtk_glew.h"
 #include <vtkObjectFactory.h>
 
-vtkStandardNewMacro(VTKViewer_Texture);
+vtkStandardNewMacro(VTKViewer_Texture)
 
 
 // ----------------------------------------------------------------------------
@@ -583,9 +583,10 @@ void VTKViewer_Texture::Load(vtkRenderer *ren)
 
       if (resampleNeeded)
         {
-        vtkDebugMacro(<< "Resampling texture to power of two for OpenGL");
-        resultData = this->ResampleToPowerOfTwo(xsize, ysize, dataPtr,
-                                                bytesPerPixel);
+          //ostate->vtkglGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxDimGL);
+          vtkDebugMacro(<< "Resampling texture to power of two for OpenGL");
+          resultData = this->ResampleToPowerOfTwo(xsize, ysize, dataPtr,
+                                                  bytesPerPixel, maxDimGL);
         }
 
       if (!resultData)