VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrv::DtPixelBufferObject Class Reference

An object which wraps an OpenGL pixel buffer object and allows for asynchronous downloads of texture data.

Public Member Functions

 DtPixelBufferObject ()
 
 ~DtPixelBufferObject ()
 
void downloadFromTexture (unsigned int texture, int w, int h)
 
void getData (void *data)
 
unsigned int bufferSize () const
 
virtual void setupPixelBufferObjects (int numBuffers)
 

Protected Attributes

std::vector< unsigned intmyPbos
 
std::vector< GLsync > myFences
 
int myMutableWriteIndex
 
int myMutableReadIndex
 
unsigned int myBufferSize
 

Constructor & Destructor Documentation

makVrv::DtPixelBufferObject::DtPixelBufferObject ( )
makVrv::DtPixelBufferObject::~DtPixelBufferObject ( )

Member Function Documentation

void makVrv::DtPixelBufferObject::downloadFromTexture ( unsigned int  texture,
int  w,
int  h 
)

Starts downloading the texture from memory.

void makVrv::DtPixelBufferObject::getData ( void *  data)

Get the data by copying it into the available data. Warning! this will block until downloading is complete. Warning! if downloading has not started no data will be available. Warning! data must be atleast bufferSize bytes.

unsigned int makVrv::DtPixelBufferObject::bufferSize ( ) const

Return the buffered data in bytes.

virtual void makVrv::DtPixelBufferObject::setupPixelBufferObjects ( int  numBuffers)
virtual

Allocate and bind the pixel buffer objects.

Member Data Documentation

std::vector<unsigned int> makVrv::DtPixelBufferObject::myPbos
protected

Pixel Buffer Object.

std::vector<GLsync> makVrv::DtPixelBufferObject::myFences
protected
int makVrv::DtPixelBufferObject::myMutableWriteIndex
mutableprotected

Write buffer index.

int makVrv::DtPixelBufferObject::myMutableReadIndex
mutableprotected

Read buffer index.

unsigned int makVrv::DtPixelBufferObject::myBufferSize
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)