VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | 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. Uses Ping Pong PBOs to allow for fast access.

Classes

struct  PboAndSize
 

Public Member Functions

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

Protected Attributes

std::vector< PboAndSizemyPbos
 
std::vector< GLsync > myFences
 
int myWriteIndex
 
int myReadIndex
 

Constructor & Destructor Documentation

makVrv::DtPixelBufferObject::DtPixelBufferObject ( )

constructor

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

destructor

makVrv::DtPixelBufferObject::DtPixelBufferObject ( const DtPixelBufferObject rhs)
delete

not allowed

Member Function Documentation

DtPixelBufferObject& makVrv::DtPixelBufferObject::operator= ( const DtPixelBufferObject rhs)
delete

not allowed

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

Starts downloading the texture from memory.

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

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 at least bufferSize bytes.

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

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<PboAndSize> makVrv::DtPixelBufferObject::myPbos
protected

Pixel Buffer Object.

std::vector<GLsync> makVrv::DtPixelBufferObject::myFences
protected
int makVrv::DtPixelBufferObject::myWriteIndex
protected

Write buffer index.

int makVrv::DtPixelBufferObject::myReadIndex
protected

Read buffer index.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)