1 #ifndef __CPPLUGINS__EXTENSIONS__OPENGLMESHMAPPER__H__
2 #define __CPPLUGINS__EXTENSIONS__OPENGLMESHMAPPER__H__
7 #include <vtkRenderWindow.h>
8 #include <vtkSmartPointer.h>
11 #include <cpPlugins/Extensions/MeshMapper.h>
20 class OpenGLMeshMapper
21 : public MeshMapper< M >
24 typedef OpenGLMeshMapper Self;
25 vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > );
27 typedef typename Superclass::TMesh TMesh;
28 typedef typename Superclass::TPoint TPoint;
29 typedef typename Superclass::TVector TVector;
30 typedef typename Superclass::TScalar TScalar;
33 typedef unsigned int TIndex;
34 typedef typename M::CellType TCell;
35 typedef typename M::CellsContainer TCellsContainer;
36 typedef typename TCellsContainer::ConstIterator TCellIt;
39 virtual const char* GetNameOfClass( ) const
40 { return( "cpPlugins::Extensions::OpenGLMeshMapper" ); }
43 virtual void RenderPiece( vtkRenderer* aren, vtkActor* act );
44 virtual void ReleaseGraphicsResources( vtkWindow* win );
45 virtual int Draw( vtkRenderer* aren, vtkActor* act );
49 virtual ~OpenGLMeshMapper( );
51 bool _ConfigureOpenGL( );
54 // Purposely not implemented
55 OpenGLMeshMapper( const Self& other );
56 Self& operator=( const Self& other );
60 // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture;
65 unsigned int VBOID1, VBOID2;
67 std::vector< unsigned int > Sizes;
68 std::vector< TIndex > Indices;
69 long IndexElementType;
70 long ElementValueType;
77 #include <cpPlugins/Extensions/OpenGLMeshMapper.hxx>
79 #endif // __CPPLUGINS__EXTENSIONS__OPENGLMESHMAPPER__H__