#ifndef __CPM__VTK__OPENGLMESHMAPPER__H__ #define __CPM__VTK__OPENGLMESHMAPPER__H__ #include /* #include #include */ #include #include #include namespace cpm { namespace VTK { /** */ template< class M > class OpenGLMeshMapper : public MeshMapper< M > { public: typedef OpenGLMeshMapper Self; vtkTypeMacro( OpenGLMeshMapper, MeshMapper< M > ); typedef typename Superclass::TMesh TMesh; typedef typename Superclass::TPoint TPoint; typedef typename Superclass::TVector TVector; typedef typename Superclass::TScalar TScalar; protected: typedef unsigned int TIndex; typedef typename M::CellType TCell; typedef typename M::CellsContainer TCellsContainer; typedef typename TCellsContainer::ConstIterator TCellIt; public: virtual const char* GetNameOfClass( ) const { return( "cpm::VTK::OpenGLMeshMapper" ); } static Self* New( ); virtual void RenderPiece( vtkRenderer* aren, vtkActor* act ); virtual void ReleaseGraphicsResources( vtkWindow* win ); virtual int Draw( vtkRenderer* aren, vtkActor* act ); protected: OpenGLMeshMapper( ); virtual ~OpenGLMeshMapper( ); bool _ConfigureOpenGL( ); private: // Purposely not implemented OpenGLMeshMapper( const Self& other ); Self& operator=( const Self& other ); protected: vtkIdType TotalCells; // TODO: vtkSmartPointer< vtkOpenGLTexture > InternalColorTexture; bool FirstRendering; bool VBOSupported; unsigned int VBOID1, VBOID2; std::vector< unsigned int > Sizes; std::vector< TIndex > Indices; long IndexElementType; long ElementValueType; }; } // ecapseman } // ecapseman //#include #endif // __CPM__VTK__OPENGLMESHMAPPER__H__ // eof - $RCSfile$