1 #ifndef __CPPLUGINS__EXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__
2 #define __CPPLUGINS__EXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__
6 #include <cpPlugins/Extensions/Visualization/MeshMapper.h>
12 namespace Visualization
17 class OpenGLMeshMapper
18 : public MeshMapper< M >
21 typedef OpenGLMeshMapper Self;
22 vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > );
24 typedef typename Superclass::TMesh TMesh;
25 typedef typename Superclass::TPoint TPoint;
26 typedef typename Superclass::TVector TVector;
27 typedef typename Superclass::TScalar TScalar;
30 typedef unsigned int TIndex;
31 typedef typename M::CellType TCell;
32 typedef typename M::CellsContainer TCellsContainer;
33 typedef typename TCellsContainer::ConstIterator TCellIt;
36 virtual const char* GetNameOfClass( ) const
37 { return( "cpPlugins::Extensions::OpenGLMeshMapper" ); }
40 virtual void RenderPiece( vtkRenderer* aren, vtkActor* act );
41 virtual void ReleaseGraphicsResources( vtkWindow* win );
42 virtual int Draw( vtkRenderer* aren, vtkActor* act );
46 virtual ~OpenGLMeshMapper( );
48 bool _ConfigureOpenGL( );
51 // Purposely not implemented
52 OpenGLMeshMapper( const Self& other );
53 Self& operator=( const Self& other );
57 // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture;
62 unsigned int VBOID1, VBOID2;
64 std::vector< unsigned int > Sizes;
65 std::vector< TIndex > Indices;
66 long IndexElementType;
67 long ElementValueType;
76 #include <cpPlugins/Extensions/Visualization/OpenGLMeshMapper.hxx>
78 #endif // __CPPLUGINS__EXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__