![]() |
VR-Forces 5.0.3 Developer's Guide
|
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 int > | myPbos |
| std::vector< GLsync > | myFences |
| int | myMutableWriteIndex |
| int | myMutableReadIndex |
| unsigned int | myBufferSize |
| makVrv::DtPixelBufferObject::DtPixelBufferObject | ( | ) |
| makVrv::DtPixelBufferObject::~DtPixelBufferObject | ( | ) |
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.
|
virtual |
Allocate and bind the pixel buffer objects.
|
protected |
|
mutableprotected |
Write buffer index.
|
mutableprotected |
Read buffer index.