X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fgraphicsbuffer.h;h=3dbb6fb9d136776b900474551b294c33645d5c07;hp=dd256178a48969948b227ccccc51fea82ac2d5d8;hb=3ab3475a54c82cb9f5e0b1dbb88035f341b92d49;hpb=ddf7783ce69eb619f5a6b12e779c134279aa2ac6 diff --git a/src/graphicsbuffer.h b/src/graphicsbuffer.h index dd25617..3dbb6fb 100644 --- a/src/graphicsbuffer.h +++ b/src/graphicsbuffer.h @@ -7,7 +7,7 @@ namespace IPDF { - /* + /** * Implementation of an OpenGL buffer, with some extra cleverness. */ class GraphicsBuffer @@ -20,6 +20,7 @@ namespace IPDF BufferTypePixelPack, // Pixel Pack buffer BufferTypePixelUnpack, BufferTypeUniform, // Uniform/Constant buffer + BufferTypeTexture, // I was hoping to avoid this one. BufferTypeDrawIndirect, }; @@ -54,6 +55,12 @@ namespace IPDF const size_t GetSize() const { return m_buffer_size; } void Invalidate(); + + // WARNING: The buffer handle can change for (almost) no reason. + // If you do _anything_ to the buffer, you'll need to call this + // again to see if we've recreated it in a vain attempt to outsmart + // the driver. + GLuint GetHandle() const { return m_buffer_handle; } void Bind() const; private: