OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::RenderToVertexBuffer Class Referenceabstract

An object which renders geometry to a vertex. More...

#include <OgreRenderToVertexBuffer.h>

+ Inheritance diagram for Ogre::RenderToVertexBuffer:
+ Collaboration diagram for Ogre::RenderToVertexBuffer:

Public Member Functions

 RenderToVertexBuffer ()
 C'tor. More...
 
virtual ~RenderToVertexBuffer ()
 D'tor. More...
 
unsigned int getMaxVertexCount () const
 Get the maximum number of vertices that the buffer will hold. More...
 
RenderOperation::OperationType getOperationType () const
 What type of primitives does this object generate? More...
 
virtual void getRenderOperation (RenderOperation &op)=0
 Get the render operation for this buffer. More...
 
const MaterialPtrgetRenderToBufferMaterial ()
 Get the material which is used to render the geometry into the vertex buffer. More...
 
bool getResetsEveryUpdate () const
 Does this object reset its buffer each time it updates? More...
 
const RenderablegetSourceRenderable () const
 Get the source renderable of this object. More...
 
VertexDeclarationgetVertexDeclaration ()
 Get the vertex declaration that the pass will output. More...
 
virtual void reset ()
 Reset the vertex buffer to the initial state. More...
 
void setMaxVertexCount (unsigned int maxVertexCount)
 Set the maximum number of vertices that the buffer will hold. More...
 
void setOperationType (RenderOperation::OperationType operationType)
 Set the type of primitives that this object generates. More...
 
void setRenderToBufferMaterialName (const String &materialName)
 Set the material name which is used to render the geometry into the vertex buffer. More...
 
void setResetsEveryUpdate (bool resetsEveryUpdate)
 Set whether this object resets its buffers each time it updates. More...
 
void setSourceRenderable (Renderable *source)
 Set the source renderable of this object. More...
 
virtual void update (SceneManager *sceneMgr)=0
 Update the contents of this vertex buffer by rendering. More...
 

Protected Attributes

MaterialPtr mMaterial
 
unsigned int mMaxVertexCount
 
RenderOperation::OperationType mOperationType
 
bool mResetRequested
 
bool mResetsEveryUpdate
 
RenderablemSourceRenderable
 
VertexDatamVertexData
 

Detailed Description

An object which renders geometry to a vertex.

Remarks
This is especially useful together with geometry shaders, as you can render procedural geometry which will get saved to a vertex buffer for reuse later, without regenerating it again. You can also create shaders that run on previous results of those shaders, creating stateful shaders.

Definition at line 51 of file OgreRenderToVertexBuffer.h.

Constructor & Destructor Documentation

Ogre::RenderToVertexBuffer::RenderToVertexBuffer ( )

C'tor.

virtual Ogre::RenderToVertexBuffer::~RenderToVertexBuffer ( )
virtual

D'tor.

Member Function Documentation

unsigned int Ogre::RenderToVertexBuffer::getMaxVertexCount ( ) const
inline

Get the maximum number of vertices that the buffer will hold.

Definition at line 70 of file OgreRenderToVertexBuffer.h.

RenderOperation::OperationType Ogre::RenderToVertexBuffer::getOperationType ( ) const
inline

What type of primitives does this object generate?

Definition at line 80 of file OgreRenderToVertexBuffer.h.

virtual void Ogre::RenderToVertexBuffer::getRenderOperation ( RenderOperation op)
pure virtual
const MaterialPtr& Ogre::RenderToVertexBuffer::getRenderToBufferMaterial ( )
inline

Get the material which is used to render the geometry into the vertex buffer.

Definition at line 129 of file OgreRenderToVertexBuffer.h.

bool Ogre::RenderToVertexBuffer::getResetsEveryUpdate ( ) const
inline

Does this object reset its buffer each time it updates?

Definition at line 95 of file OgreRenderToVertexBuffer.h.

const Renderable* Ogre::RenderToVertexBuffer::getSourceRenderable ( ) const
inline

Get the source renderable of this object.

Definition at line 123 of file OgreRenderToVertexBuffer.h.

VertexDeclaration* Ogre::RenderToVertexBuffer::getVertexDeclaration ( )

Get the vertex declaration that the pass will output.

Remarks
Use this object to set the elements of the buffer. Object will calculate buffers on its own. Only one source allowed!
virtual void Ogre::RenderToVertexBuffer::reset ( void  )
inlinevirtual

Reset the vertex buffer to the initial state.

In the next update, the source renderable will be used as input.

Definition at line 111 of file OgreRenderToVertexBuffer.h.

void Ogre::RenderToVertexBuffer::setMaxVertexCount ( unsigned int  maxVertexCount)
inline

Set the maximum number of vertices that the buffer will hold.

Definition at line 75 of file OgreRenderToVertexBuffer.h.

void Ogre::RenderToVertexBuffer::setOperationType ( RenderOperation::OperationType  operationType)
inline

Set the type of primitives that this object generates.

Definition at line 85 of file OgreRenderToVertexBuffer.h.

void Ogre::RenderToVertexBuffer::setRenderToBufferMaterialName ( const String materialName)

Set the material name which is used to render the geometry into the vertex buffer.

void Ogre::RenderToVertexBuffer::setResetsEveryUpdate ( bool  resetsEveryUpdate)
inline

Set whether this object resets its buffers each time it updates.

Definition at line 90 of file OgreRenderToVertexBuffer.h.

void Ogre::RenderToVertexBuffer::setSourceRenderable ( Renderable source)
inline

Set the source renderable of this object.

During the first (and perhaps later) update of this object, this object's data will be used as input)

Definition at line 118 of file OgreRenderToVertexBuffer.h.

virtual void Ogre::RenderToVertexBuffer::update ( SceneManager sceneMgr)
pure virtual

Update the contents of this vertex buffer by rendering.

Implemented in Ogre::GLES2RenderToVertexBuffer, Ogre::GLRenderToVertexBuffer, Ogre::GL3PlusRenderToVertexBuffer, and Ogre::D3D11RenderToVertexBuffer.

Member Data Documentation

MaterialPtr Ogre::RenderToVertexBuffer::mMaterial
protected

Definition at line 140 of file OgreRenderToVertexBuffer.h.

unsigned int Ogre::RenderToVertexBuffer::mMaxVertexCount
protected

Definition at line 143 of file OgreRenderToVertexBuffer.h.

RenderOperation::OperationType Ogre::RenderToVertexBuffer::mOperationType
protected

Definition at line 137 of file OgreRenderToVertexBuffer.h.

bool Ogre::RenderToVertexBuffer::mResetRequested
protected

Definition at line 139 of file OgreRenderToVertexBuffer.h.

bool Ogre::RenderToVertexBuffer::mResetsEveryUpdate
protected

Definition at line 138 of file OgreRenderToVertexBuffer.h.

Renderable* Ogre::RenderToVertexBuffer::mSourceRenderable
protected

Definition at line 141 of file OgreRenderToVertexBuffer.h.

VertexData* Ogre::RenderToVertexBuffer::mVertexData
protected

Definition at line 142 of file OgreRenderToVertexBuffer.h.


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