CopperSpice API  1.7.2
QOpenGLBuffer Class Reference

The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects. More...

Public Methods

 QOpenGLBuffer ()
 

Detailed Description

The QOpenGLBuffer class provides functions for creating and managing OpenGL buffer objects. Buffer objects are created in the OpenGL server so that the client application can avoid uploading vertices, indices, texture image data, etc every time they are needed.

QOpenGLBuffer objects can be copied around as a reference to the underlying OpenGL buffer object:

QOpenGLBuffer buffer1(QOpenGLBuffer::IndexBuffer);
buffer1.create();
QOpenGLBuffer buffer2 = buffer1;

QOpenGLBuffer performs a shallow copy when objects are copied in this manner, but does not implement copy-on-write semantics. The original object will be affected whenever the copy is modified.

Note
Additional documentation pending.

Constructor & Destructor Documentation

QOpenGLBuffer::QOpenGLBuffer ( )

Constructs a new buffer object of type QOpenGLBuffer::VertexBuffer. This constructor creates the QOpenGLBuffer instance. The actual buffer object in the OpenGL server is not created until create() is called.

See also
create()