Version: 9.12.0
VTKViewer_OpenGLRenderer.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 #ifndef VTKVIEWER_OPENGLRENDERER_H
24 #define VTKVIEWER_OPENGLRENDERER_H
25 
26 #include "VTKViewer.h"
27 #include "vtkOpenGLRenderer.h"
28 #include "VTKViewer_OpenGLHelper.h"
29 
31 {
32 public:
33  enum {
41  FourthCornerGradient
42  };
43 
44 public:
47 
48  virtual void SetGradientType( const int );
49 
50  virtual void Clear(void);
51 
52 protected:
55 
56 private:
58 
59  typedef std::vector< std::vector<double> > Vec2D;
60  void GetCornersColor(Vec2D&);
61 
62 #ifdef VTK_OPENGL2
63  VTKViewer_OpenGLHelper OpenGLHelper;
64  GLhandleARB BackgroundProgram;
65  GLhandleARB BackgroundVertexShader;
66  GLhandleARB BackgroundFragmentShader;
67  GLuint VertexArrayObject;
68 
69  struct Locations
70  {
71  static const GLint INVALID_LOCATION = -1;
72 
73  GLint UseTexture;
74  GLint BackgroundTexture;
75 
76  Locations()
77  : UseTexture (INVALID_LOCATION),
78  BackgroundTexture (INVALID_LOCATION)
79  {
80  //
81  }
82 
83  } myLocations;
84 #endif
85 
86 
87 private:
89  void operator=(const VTKViewer_OpenGLRenderer&); // Not implemented.
90 };
91 
92 #endif
#define VTKVIEWER_EXPORT
Definition: VTKViewer.h:33
GLuint GLhandleARB
Definition: VTKViewer_OpenGLHelper.h:35
Definition: VTKViewer_OpenGLHelper.h:106
Definition: VTKViewer_OpenGLRenderer.h:31
void operator=(const VTKViewer_OpenGLRenderer &)
@ ThirdCornerGradient
Definition: VTKViewer_OpenGLRenderer.h:40
@ FirstCornerGradient
Definition: VTKViewer_OpenGLRenderer.h:38
@ FirstDiagonalGradient
Definition: VTKViewer_OpenGLRenderer.h:36
@ SecondCornerGradient
Definition: VTKViewer_OpenGLRenderer.h:39
@ VerticalGradient
Definition: VTKViewer_OpenGLRenderer.h:35
@ SecondDiagonalGradient
Definition: VTKViewer_OpenGLRenderer.h:37
@ HorizontalGradient
Definition: VTKViewer_OpenGLRenderer.h:34
VTKViewer_OpenGLRenderer(const VTKViewer_OpenGLRenderer &)
int GradientType
Definition: VTKViewer_OpenGLRenderer.h:57
vtkTypeMacro(VTKViewer_OpenGLRenderer, vtkOpenGLRenderer) virtual void SetGradientType(const int)
static VTKViewer_OpenGLRenderer * New()
std::vector< std::vector< double > > Vec2D
Definition: VTKViewer_OpenGLRenderer.h:59