Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QGLBuffer class provides functions for creating and managing GL buffer objects. More...
Public Types | |
enum | Access { ReadOnly = 35000, ReadWrite = 35002, WriteOnly = 35001 } |
More... | |
enum | Type { IndexBuffer = 34963, PixelPackBuffer = 35051, PixelUnpackBuffer = 35052, VertexBuffer = 34962 } |
More... | |
enum | UsagePattern { DynamicCopy = 35050, DynamicDraw = 35048, DynamicRead = 35049, StaticCopy = 35046, StaticDraw = 35044, StaticRead = 35045, StreamCopy = 35042, StreamDraw = 35040, StreamRead = 35041 } |
More... | |
Public Member Functions | |
QGLBuffer () | |
| |
QGLBuffer (QGLBuffer other) | |
| |
QGLBuffer (QGLBuffer.Type type) | |
| |
virtual void | CreateProxy () |
new void | Allocate (int count) |
| |
new bool | Bind () |
| |
new uint | BufferId () |
| |
new bool | Create () |
| |
new void | Destroy () |
| |
new bool | IsCreated () |
| |
new void | Release () |
| |
new int | Size () |
| |
new QGLBuffer.Type | type () |
| |
new bool | Unmap () |
| |
new void | Dispose () |
Static Public Member Functions | |
static void | Release (QGLBuffer.Type type) |
| |
Protected Member Functions | |
QGLBuffer (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new QGLBuffer.UsagePattern | usagePattern [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
The QGLBuffer class provides functions for creating and managing GL buffer objects.
Buffer objects are created in the GL server so that the client application can avoid uploading vertices, indices, texture image data, etc every time they are needed.
QGLBuffer objects can be copied around as a reference to the underlying GL buffer object:
QGLBuffer buffer1(QGLBuffer::IndexBuffer);
buffer1.create();
QGLBuffer buffer2 = buffer1;
QGLBuffer 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.
This enum defines the type of GL buffer object to create with QGLBuffer.
This enum defines the usage pattern of a QGLBuffer object.
|
protected |
QtOpenGL.QGLBuffer.QGLBuffer | ( | ) |
Constructs a new buffer object of type QGLBuffer::VertexBuffer.
Note: this constructor just creates the QGLBuffer instance. The actual buffer object in the GL server is not created until create() is called.
See also create().
QtOpenGL.QGLBuffer.QGLBuffer | ( | QGLBuffer | other | ) |
Constructs a shallow copy of other.
Note: QGLBuffer does not implement copy-on-write semantics, so other will be affected whenever the copy is modified.
QtOpenGL.QGLBuffer.QGLBuffer | ( | QGLBuffer.Type | type | ) |
Constructs a new buffer object of type QGLBuffer::VertexBuffer.
Note: this constructor just creates the QGLBuffer instance. The actual buffer object in the GL server is not created until create() is called.
See also create().
new void QtOpenGL.QGLBuffer.Allocate | ( | int | count | ) |
This is an overloaded function.
Allocates count bytes of space to the buffer. Any previous contents will be removed.
It is assumed that create() has been called on this buffer and that it has been bound to the current context.
See also create() and write().
new bool QtOpenGL.QGLBuffer.Bind | ( | ) |
Binds the buffer associated with this object to the current GL context. Returns false if binding was not possible, usually because type() is not supported on this GL implementation.
The buffer must be bound to the same QGLContext current when create() was called, or to another QGLContext that is sharing with it. Otherwise, false will be returned from this function.
See also release() and create().
new uint QtOpenGL.QGLBuffer.BufferId | ( | ) |
Returns the GL identifier associated with this buffer; zero if the buffer has not been created.
See also isCreated().
new bool QtOpenGL.QGLBuffer.Create | ( | ) |
Creates the buffer object in the GL server. Returns true if the object was created; false otherwise.
This function must be called with a current QGLContext. The buffer will be bound to and can only be used in that context (or any other context that is shared with it).
This function will return false if the GL implementation does not support buffers, or there is no current QGLContext.
See also isCreated(), allocate(), write(), and destroy().
|
virtual |
new void QtOpenGL.QGLBuffer.Destroy | ( | ) |
Destroys this buffer object, including the storage being used in the GL server. All references to the buffer will become invalid.
new void QtOpenGL.QGLBuffer.Dispose | ( | ) |
new bool QtOpenGL.QGLBuffer.IsCreated | ( | ) |
Returns true if this buffer has been created; false otherwise.
See also create() and destroy().
new void QtOpenGL.QGLBuffer.Release | ( | ) |
Releases the buffer associated with this object from the current GL context.
This function must be called with the same QGLContext current as when bind() was called on the buffer.
See also bind().
|
static |
Releases the buffer associated with this object from the current GL context.
This function must be called with the same QGLContext current as when bind() was called on the buffer.
See also bind().
new int QtOpenGL.QGLBuffer.Size | ( | ) |
Returns the size of the data in this buffer, for reading operations. Returns -1 if fetching the buffer size is not supported, or the buffer has not been created.
It is assumed that this buffer has been bound to the current context.
See also isCreated() and bind().
new QGLBuffer.Type QtOpenGL.QGLBuffer.type | ( | ) |
Returns the type of buffer represented by this object.
new bool QtOpenGL.QGLBuffer.Unmap | ( | ) |
Unmaps the buffer after it was mapped into the application's memory space with a previous call to map(). Returns true if the unmap succeeded; false otherwise.
It is assumed that this buffer has been bound to the current context, and that it was previously mapped with map().
This function is only supported under OpenGL/ES if the GL_OES_mapbuffer extension is present.
See also map().
|
protected |
|
getset |
|
getset |
Returns the usage pattern for this buffer object. The default value is StaticDraw.
Sets the usage pattern for this buffer object to value. This function must be called before allocate() or write().