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

OpenGL-based GPUGeometry implementation. More...

#include <mitsuba/hw/glgeometry.h>

+ Inheritance diagram for mitsuba::GLGeometry:

Public Member Functions

 GLGeometry (const TriMesh *mesh)
 Create a new GLGeometry instance for the given mesh. More...
 
void init ()
 Upload the geometry object. More...
 
void refresh ()
 Refresh (re-upload) the geometry object. More...
 
void bind ()
 Bind the geometry object. More...
 
void unbind ()
 Unbind the geometry object. More...
 
void cleanup ()
 Free the geometry object from GPU memory. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from mitsuba::GPUGeometry
 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...
 
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...
 
- 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 mitsuba::GPUGeometry
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Types

enum  EIdentifier { EVertexID = 0, EIndexID = 1 }
 

Protected Member Functions

virtual ~GLGeometry ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from mitsuba::GPUGeometry
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

GLuint m_id [2]
 
GLuint64 m_addr [2]
 
GLuint m_size [2]
 
int m_stride
 
- Protected Attributes inherited from mitsuba::GPUGeometry
ref< const TriMeshm_mesh
 
Shaderm_shader
 

Friends

class GLRenderer
 

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

OpenGL-based GPUGeometry implementation.

Member Enumeration Documentation

Enumerator
EVertexID 
EIndexID 

Constructor & Destructor Documentation

mitsuba::GLGeometry::GLGeometry ( const TriMesh mesh)

Create a new GLGeometry instance for the given mesh.

virtual mitsuba::GLGeometry::~GLGeometry ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

void mitsuba::GLGeometry::bind ( )
virtual

Bind the geometry object.

Implements mitsuba::GPUGeometry.

void mitsuba::GLGeometry::cleanup ( )
virtual

Free the geometry object from GPU memory.

Implements mitsuba::GPUGeometry.

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

Retrieve this object's class.

Reimplemented from mitsuba::GPUGeometry.

void mitsuba::GLGeometry::init ( )
virtual

Upload the geometry object.

Implements mitsuba::GPUGeometry.

void mitsuba::GLGeometry::refresh ( )
virtual

Refresh (re-upload) the geometry object.

Implements mitsuba::GPUGeometry.

void mitsuba::GLGeometry::unbind ( )
virtual

Unbind the geometry object.

Implements mitsuba::GPUGeometry.

Friends And Related Function Documentation

friend class GLRenderer
friend

Member Data Documentation

GLuint64 mitsuba::GLGeometry::m_addr[2]
protected
GLuint mitsuba::GLGeometry::m_id[2]
protected
GLuint mitsuba::GLGeometry::m_size[2]
protected
int mitsuba::GLGeometry::m_stride
protected
Class* mitsuba::GLGeometry::m_theClass
static

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