OpenSceneGraph 2.8.4
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
osg::PixelDataBufferObject Class Reference

This object represent a general class of pixel buffer objects, which are capable of allocating buffer object (memory) on the GPU. More...

Inheritance diagram for osg::PixelDataBufferObject:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Mode { NONE = 0, READ = 1, WRITE = 2 }

Public Member Functions

 PixelDataBufferObject ()
 PixelDataBufferObject (const PixelDataBufferObject &pbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Object (osg, PixelDataBufferObject)
void setDataSize (unsigned int size)
 Set new size of the buffer object. This will reallocate the memory on the next compile.
unsigned int getDataSize ()
 Get data size of the used buffer.
virtual void compileBuffer (State &state) const
 Compile the buffer (reallocate the memory if buffer is dirty)
virtual void bindBufferInReadMode (State &state)
 Bind the buffer in read mode, which means that data can be downloaded from the buffer (note: GL_PIXEL_UNPACK_BUFFER_ARB)
virtual void bindBufferInWriteMode (State &state)
 Bind the buffer in write mode, which means following OpenGL instructions will write data into the buffer (note: GL_PIXEL_PACK_BUFFER_ARB)
virtual void unbindBuffer (unsigned int contextID) const
 Unbind the buffer.
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 Resize any per context GLObject buffers to specified size.
Mode getMode (unsigned int contextID) const

Protected Types

typedef osg::buffered_value
< unsigned int > 
ModeList

Protected Member Functions

virtual ~PixelDataBufferObject ()

Protected Attributes

BufferEntry _bufferData
ModeList _mode

Detailed Description

This object represent a general class of pixel buffer objects, which are capable of allocating buffer object (memory) on the GPU.

The memory can then be used either for CPU-GPU pixel transfer or directly for GPU-GPU transfer, without CPU intervention.


Member Typedef Documentation

typedef osg::buffered_value<unsigned int> osg::PixelDataBufferObject::ModeList [protected]

Member Enumeration Documentation

Enumerator:
NONE 

A normal mode of this data buffer.

READ 

Buffer is in read mode (.

See also:
bindBufferInReadMode)
WRITE 

Buffer is in write mode (.

See also:
bindBufferInWriteMode)

Constructor & Destructor Documentation

osg::PixelDataBufferObject::PixelDataBufferObject ( )
osg::PixelDataBufferObject::PixelDataBufferObject ( const PixelDataBufferObject pbo,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)
virtual osg::PixelDataBufferObject::~PixelDataBufferObject ( ) [protected, virtual]

Member Function Documentation

virtual void osg::PixelDataBufferObject::bindBufferInReadMode ( State state) [virtual]

Bind the buffer in read mode, which means that data can be downloaded from the buffer (note: GL_PIXEL_UNPACK_BUFFER_ARB)

virtual void osg::PixelDataBufferObject::bindBufferInWriteMode ( State state) [virtual]

Bind the buffer in write mode, which means following OpenGL instructions will write data into the buffer (note: GL_PIXEL_PACK_BUFFER_ARB)

virtual void osg::PixelDataBufferObject::compileBuffer ( State state) const [virtual]

Compile the buffer (reallocate the memory if buffer is dirty)

Implements osg::BufferObject.

unsigned int osg::PixelDataBufferObject::getDataSize ( ) [inline]

Get data size of the used buffer.

Mode osg::PixelDataBufferObject::getMode ( unsigned int  contextID) const [inline]
osg::PixelDataBufferObject::META_Object ( osg  ,
PixelDataBufferObject   
)
virtual void osg::PixelDataBufferObject::resizeGLObjectBuffers ( unsigned int  maxSize) [virtual]

Resize any per context GLObject buffers to specified size.

Reimplemented from osg::BufferObject.

void osg::PixelDataBufferObject::setDataSize ( unsigned int  size) [inline]

Set new size of the buffer object. This will reallocate the memory on the next compile.

virtual void osg::PixelDataBufferObject::unbindBuffer ( unsigned int  contextID) const [virtual]

Unbind the buffer.

Reimplemented from osg::BufferObject.


Member Data Documentation

BufferEntry osg::PixelDataBufferObject::_bufferData [protected]

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

osg logo
Generated at Sun Jan 8 2012 13:16:06 for the OpenSceneGraph by doxygen 1.7.4.