![]() |
VR-Forces Developer's Guide
|
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 | |
| DtPixelBufferObject & | operator= (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< PboAndSize > | myPbos |
| std::vector< GLsync > | myFences |
| int | myWriteIndex |
| int | myReadIndex |
| makVrv::DtPixelBufferObject::DtPixelBufferObject | ( | ) |
constructor
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
|
virtual |
Starts downloading the texture from memory.
|
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.
Return the buffered data in bytes.
|
virtual |
Allocate and bind the pixel buffer objects.
|
protected |
Pixel Buffer Object.
|
protected |
|
protected |
Write buffer index.
|
protected |
Read buffer index.