SenOGL
0.2
Library aiming to ease the use of OpenGL
|
Base class for every OpenGL Object. More...
#include <OpenGLObject.hpp>
Classes | |
class | Binder |
Generic Binder Does nothing at this stage. More... | |
Public Member Functions | |
OpenGLObject () | |
OpenGLObject (GLuint handle) | |
Constructs a instance managing an existing OpenGL Object. More... | |
OpenGLObject (const OpenGLObject &)=default | |
OpenGLObject (OpenGLObject &&)=default | |
OpenGLObject & | operator= (const OpenGLObject &)=default |
OpenGLObject & | operator= (OpenGLObject &&)=default |
virtual | ~OpenGLObject () |
virtual void | init ()=0 |
Generates a OpenGL object name to manage. More... | |
virtual void | cleanup ()=0 |
Deletes the managed OpenGL object. More... | |
GLuint | getName () const |
Returns OpenGL name of the object. More... | |
void | setName (GLuint n) |
Sets the OpenGL name of the object managed by this instance /!\ Use with caution ! (assignment operator is probably what you're looking for) More... | |
virtual bool | isValid () const |
Returns true if the object seems valid. More... | |
operator bool () const | |
Syntactic sugar for isValid(). More... | |
Protected Attributes | |
GLuint | _handle |
OpenGL name of the managed object. More... | |
Base class for every OpenGL Object.
OpenGLObject::OpenGLObject | ( | ) |
OpenGLObject::OpenGLObject | ( | GLuint | handle | ) |
Constructs a instance managing an existing OpenGL Object.
(Copy-constructor is generally a better option)
handle | Object to manage. |
|
default |
|
default |
|
virtual |
|
pure virtual |
Deletes the managed OpenGL object.
Implemented in Buffer, Sampler, Texture, Framebuffer< TexType, ColorCount, DepthType, UseDepth >, Query, ProgramPipeline, Shader, Program, Renderbuffer, TransformFeedback, and VertexArray.
|
inline |
Returns OpenGL name of the object.
|
pure virtual |
Generates a OpenGL object name to manage.
Implemented in Buffer, Texture, Framebuffer< TexType, ColorCount, DepthType, UseDepth >, Query, ProgramPipeline, Shader, Program, Renderbuffer, TransformFeedback, and VertexArray.
|
inlinevirtual |
Returns true if the object seems valid.
Can be overloaded for concrete types if there is other attributes to test.
Reimplemented in Texture, Program, Sampler, Shader, and Renderbuffer.
|
inline |
|
default |
|
default |
|
inline |
Sets the OpenGL name of the object managed by this instance /!\ Use with caution ! (assignment operator is probably what you're looking for)
n | New object to manage. |
|
protected |
OpenGL name of the managed object.