Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::GPUGeometry Class Referenceabstract

Abstract geometry storage on a graphics card. More...

#include <mitsuba/hw/gpugeometry.h>

+ Inheritance diagram for mitsuba::GPUGeometry:

Public Member Functions

 GPUGeometry (const TriMesh *mesh)
 Create an empty geometry object. More...
 
std::string getName () const
 Return the name of this geometry object. More...
 
const TriMeshgetTriMesh () const
 Return the associated triangle mesh. More...
 
virtual void init ()=0
 Upload the geometry object. More...
 
virtual void refresh ()=0
 Refresh (re-upload) the geometry object. More...
 
virtual void bind ()=0
 Bind the geometry object. More...
 
virtual void unbind ()=0
 Unbind the geometry object. More...
 
virtual void cleanup ()=0
 Free the geometry object from GPU memory. More...
 
ShadergetShader ()
 Return an (auxiliary) shader instance associated with the geometry. More...
 
const ShadergetShader () const
 Return an (auxiliary) shader instance associated with the geometry. More...
 
void setShader (Shader *shader)
 Set an (auxiliary) shader instance associated with the geometry. More...
 
std::string toString () const
 Return a string representation. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~GPUGeometry ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Protected Attributes

ref< const TriMeshm_mesh
 
Shaderm_shader
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 

Detailed Description

Abstract geometry storage on a graphics card.

Constructor & Destructor Documentation

mitsuba::GPUGeometry::GPUGeometry ( const TriMesh mesh)

Create an empty geometry object.

virtual mitsuba::GPUGeometry::~GPUGeometry ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

virtual void mitsuba::GPUGeometry::bind ( )
pure virtual

Bind the geometry object.

Implemented in mitsuba::GLGeometry.

virtual void mitsuba::GPUGeometry::cleanup ( )
pure virtual

Free the geometry object from GPU memory.

Implemented in mitsuba::GLGeometry.

virtual const Class* mitsuba::GPUGeometry::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from Object.

Reimplemented in mitsuba::GLGeometry.

std::string mitsuba::GPUGeometry::getName ( ) const
inline

Return the name of this geometry object.

Shader* mitsuba::GPUGeometry::getShader ( )
inline

Return an (auxiliary) shader instance associated with the geometry.

const Shader* mitsuba::GPUGeometry::getShader ( ) const
inline

Return an (auxiliary) shader instance associated with the geometry.

const TriMesh* mitsuba::GPUGeometry::getTriMesh ( ) const
inline

Return the associated triangle mesh.

virtual void mitsuba::GPUGeometry::init ( )
pure virtual

Upload the geometry object.

Implemented in mitsuba::GLGeometry.

virtual void mitsuba::GPUGeometry::refresh ( )
pure virtual

Refresh (re-upload) the geometry object.

Implemented in mitsuba::GLGeometry.

void mitsuba::GPUGeometry::setShader ( Shader shader)
inline

Set an (auxiliary) shader instance associated with the geometry.

std::string mitsuba::GPUGeometry::toString ( ) const
virtual

Return a string representation.

Reimplemented from Object.

virtual void mitsuba::GPUGeometry::unbind ( )
pure virtual

Unbind the geometry object.

Implemented in mitsuba::GLGeometry.

Member Data Documentation

ref<const TriMesh> mitsuba::GPUGeometry::m_mesh
protected
Shader* mitsuba::GPUGeometry::m_shader
protected
Class* mitsuba::GPUGeometry::m_theClass
static

The documentation for this class was generated from the following file: