#include <rGLuintObject.h>
Public Member Functions | |
rGLuintObject () | |
default constructor | |
operator GLuint () | |
implicit conversion to GLuints, auto-creating the object | |
bool | IsValid () const |
checks whether the object is valid | |
virtual | ~rGLuintObject () |
NOTE: the destructor of a derived class needs to call Delete() itself. | |
void | Gen () |
reserve the object | |
void | Delete () |
free the object | |
Protected Member Functions | |
rGLuintObject (rGLuintObject const &) | |
forbidden copy construcor | |
rGLuintObject & | operator= (rGLuintObject const &) |
Protected Attributes | |
GLuint | object_ |
forbidden copy operator | |
Private Member Functions | |
virtual void | DoGen ()=0 |
really reserves the object | |
virtual void | DoDelete ()=0 |
really frees the object |
Definition at line 35 of file rGLuintObject.h.
rGLuintObject::rGLuintObject | ( | ) |
default constructor
Definition at line 32 of file rGLuintObject.cpp.
00033 : object_(0) 00034 { 00035 }
rGLuintObject::~rGLuintObject | ( | ) | [virtual] |
NOTE: the destructor of a derived class needs to call Delete() itself.
Definition at line 51 of file rGLuintObject.cpp.
rGLuintObject::rGLuintObject | ( | rGLuintObject const & | ) | [protected] |
forbidden copy construcor
rGLuintObject::operator GLuint | ( | ) |
implicit conversion to GLuints, auto-creating the object
Definition at line 38 of file rGLuintObject.cpp.
References Gen(), and object_.
bool rGLuintObject::IsValid | ( | ) | const |
void rGLuintObject::Gen | ( | ) |
reserve the object
Definition at line 55 of file rGLuintObject.cpp.
References DoGen(), object_, and sr_CheckGLError().
Referenced by operator GLuint().
00056 { 00057 if ( !object_ ) 00058 { 00059 sr_CheckGLError(); 00060 DoGen(); 00061 sr_CheckGLError(); 00062 } 00063 }
void rGLuintObject::Delete | ( | ) |
free the object
Definition at line 65 of file rGLuintObject.cpp.
References DoDelete(), object_, and sr_CheckGLError().
Referenced by rGluintObjectDummy::~rGluintObjectDummy().
00066 { 00067 if ( object_ ) 00068 { 00069 sr_CheckGLError(); 00070 DoDelete(); 00071 sr_CheckGLError(); 00072 } 00073 object_ = 0; 00074 }
rGLuintObject& rGLuintObject::operator= | ( | rGLuintObject const & | ) | [protected] |
virtual void rGLuintObject::DoGen | ( | ) | [private, pure virtual] |
really reserves the object
Implemented in rGluintObjectDummy.
Referenced by Gen().
virtual void rGLuintObject::DoDelete | ( | ) | [private, pure virtual] |
really frees the object
Implemented in rGluintObjectDummy.
Referenced by Delete().
GLuint rGLuintObject::object_ [protected] |
forbidden copy operator
the wrapped "object"
Definition at line 51 of file rGLuintObject.h.
Referenced by Delete(), Gen(), IsValid(), and operator GLuint().