1 #ifndef __CPEXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__
2 #define __CPEXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__
6 #include <cpExtensions/Visualization/MeshMapper.h>
10 namespace Visualization
15 class OpenGLMeshMapper
16 : public MeshMapper< M >
19 typedef OpenGLMeshMapper Self;
20 vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > );
22 typedef typename Superclass::TMesh TMesh;
23 typedef typename Superclass::TPoint TPoint;
24 typedef typename Superclass::TVector TVector;
25 typedef typename Superclass::TScalar TScalar;
28 typedef unsigned int TIndex;
29 typedef typename M::CellType TCell;
30 typedef typename M::CellsContainer TCellsContainer;
31 typedef typename TCellsContainer::ConstIterator TCellIt;
34 virtual const char* GetNameOfClass( ) const
35 { return( "cpExtensions::OpenGLMeshMapper" ); }
38 virtual void RenderPiece( vtkRenderer* aren, vtkActor* act );
39 virtual void ReleaseGraphicsResources( vtkWindow* win );
40 virtual int Draw( vtkRenderer* aren, vtkActor* act );
44 virtual ~OpenGLMeshMapper( );
46 bool _ConfigureOpenGL( );
49 // Purposely not implemented
50 OpenGLMeshMapper( const Self& other );
51 Self& operator=( const Self& other );
55 // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture;
60 unsigned int VBOID1, VBOID2;
62 std::vector< unsigned int > Sizes;
63 std::vector< TIndex > Indices;
64 long IndexElementType;
65 long ElementValueType;
72 #include <cpExtensions/Visualization/OpenGLMeshMapper.hxx>
74 #endif // __CPEXTENSIONS__VISUALIZATION__OPENGLMESHMAPPER__H__