-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//! Implement superclass render method.
virtual void RenderPiece( vtkRenderer*, vtkActor* );
-
//! Draw method for OpenGL.
+#ifndef VTK_OPENGL2
virtual int Draw( vtkRenderer*, vtkActor* );
+#else
+ virtual void RenderPieceDraw( vtkRenderer*, vtkActor* );
+#endif
protected:
VTKViewer_PolyDataMapper();
void InitTextures();
//! Initializing of the Vertex Shader.
- void InitShader();
+ int InitShader();
+
+ void InternalDraw(vtkRenderer*, vtkActor*);
private:
int ExtensionsInitialized;
GLuint PointSpriteTexture;
vtkSmartPointer<vtkImageData> ImageData;
-
- GLhandleARB VertexProgram;
+
+ GLhandleARB PointProgram;
+#ifdef VTK_OPENGL2
+ GLhandleARB VertexShader;
+ GLhandleARB FragmentShader;
+ GLuint VertexArrayObject;
+#endif
+
+ struct Locations {
+ static const GLint INVALID_LOCATION = -1;
+
+ GLint ModelViewProjection;
+ GLint GeneralPointSize;
+ GLint PointSprite;
+
+ Locations()
+ : ModelViewProjection (INVALID_LOCATION),
+ GeneralPointSize (INVALID_LOCATION),
+ PointSprite (INVALID_LOCATION)
+ {
+ //
+ }
+ } myLocations;
bool MarkerEnabled;
- bool BallEnabled;
+ bool BallEnabled;
double BallScale;
VTK::MarkerType MarkerType;
VTK::MarkerScale MarkerScale;