QGLBuffer Class Reference

#include <qglbuffer.h>

Class Description

Definition at line 56 of file qglbuffer.h.

Public Types

enum  Type { VertexBuffer = 0x8892, IndexBuffer = 0x8893, PixelPackBuffer = 0x88EB, PixelUnpackBuffer = 0x88EC }
 
enum  UsagePattern {
  StreamDraw = 0x88E0, StreamRead = 0x88E1, StreamCopy = 0x88E2, StaticDraw = 0x88E4,
  StaticRead = 0x88E5, StaticCopy = 0x88E6, DynamicDraw = 0x88E8, DynamicRead = 0x88E9,
  DynamicCopy = 0x88EA
}
 
enum  Access { ReadOnly = 0x88B8, WriteOnly = 0x88B9, ReadWrite = 0x88BA }
 

Public Member Functions

 QGLBuffer ()
 
 QGLBuffer (QGLBuffer::Type type)
 
 QGLBuffer (const QGLBuffer &other)
 
 ~QGLBuffer ()
 
QGLBufferoperator= (const QGLBuffer &other)
 
QGLBuffer::Type type () const
 
QGLBuffer::UsagePattern usagePattern () const
 
void setUsagePattern (QGLBuffer::UsagePattern value)
 
bool create ()
 
bool isCreated () const
 
void destroy ()
 
bool bind ()
 
void release ()
 
GLuint bufferId () const
 
int size () const
 
bool read (int offset, void *data, int count)
 
void write (int offset, const void *data, int count)
 
void allocate (const void *data, int count)
 
void allocate (int count)
 
voidmap (QGLBuffer::Access access)
 
bool unmap ()
 

Static Public Member Functions

static void release (QGLBuffer::Type type)
 

Member Enumeration Documentation

enum Type
Enumerator
VertexBuffer 
IndexBuffer 
PixelPackBuffer 
PixelUnpackBuffer 

Definition at line 59 of file qglbuffer.h.

60  {
61  VertexBuffer = 0x8892, // GL_ARRAY_BUFFER
62  IndexBuffer = 0x8893, // GL_ELEMENT_ARRAY_BUFFER
63  PixelPackBuffer = 0x88EB, // GL_PIXEL_PACK_BUFFER
64  PixelUnpackBuffer = 0x88EC // GL_PIXEL_UNPACK_BUFFER
65  };
Enumerator
StreamDraw 
StreamRead 
StreamCopy 
StaticDraw 
StaticRead 
StaticCopy 
DynamicDraw 
DynamicRead 
DynamicCopy 

Definition at line 74 of file qglbuffer.h.

75  {
76  StreamDraw = 0x88E0, // GL_STREAM_DRAW
77  StreamRead = 0x88E1, // GL_STREAM_READ
78  StreamCopy = 0x88E2, // GL_STREAM_COPY
79  StaticDraw = 0x88E4, // GL_STATIC_DRAW
80  StaticRead = 0x88E5, // GL_STATIC_READ
81  StaticCopy = 0x88E6, // GL_STATIC_COPY
82  DynamicDraw = 0x88E8, // GL_DYNAMIC_DRAW
83  DynamicRead = 0x88E9, // GL_DYNAMIC_READ
84  DynamicCopy = 0x88EA // GL_DYNAMIC_COPY
85  };
enum Access
Enumerator
ReadOnly 
WriteOnly 
ReadWrite 

Definition at line 87 of file qglbuffer.h.

88  {
89  ReadOnly = 0x88B8, // GL_READ_ONLY
90  WriteOnly = 0x88B9, // GL_WRITE_ONLY
91  ReadWrite = 0x88BA // GL_READ_WRITE
92  };

Constructor & Destructor Documentation

QGLBuffer ( )
QGLBuffer ( QGLBuffer::Type  type)
explicit
QGLBuffer ( const QGLBuffer other)
~QGLBuffer ( )

Member Function Documentation

QGLBuffer& operator= ( const QGLBuffer other)
QGLBuffer::Type type ( ) const
QGLBuffer::UsagePattern usagePattern ( ) const
void setUsagePattern ( QGLBuffer::UsagePattern  value)
bool create ( )
bool isCreated ( ) const
void destroy ( )
bool bind ( )
void release ( )
static void release ( QGLBuffer::Type  type)
static
GLuint bufferId ( ) const
int size ( ) const
bool read ( int  offset,
void data,
int  count 
)
void write ( int  offset,
const void data,
int  count 
)
void allocate ( const void data,
int  count 
)
void allocate ( int  count)
inline

Definition at line 117 of file qglbuffer.h.

117 { allocate(0, count); }
GLuint GLuint GLsizei count
Definition: GLee.h:872
void allocate(const void *data, int count)
void* map ( QGLBuffer::Access  access)
bool unmap ( )

The documentation for this class was generated from the following file: