| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
globjects::Object Class Referenceabstract

Superclass of all wrapped OpenGL objects. More...

`#include <globjects/include/globjects/Object.h>`

Inheritance diagram for globjects::Object:

## Public Types
enum | NameImplementation { NameImplementation::DebugKHR, NameImplementation::Legacy }

## Public Member Functions
virtual void | accept (ObjectVisitor &visitor)=0
gl::GLuint | id () const
std::string | name () const
void | setName (const std::string &name)
bool | hasName () const
bool | isDefault () const
virtual gl::GLenum | objectType () const =0
void | detach ()
Public Member Functions inherited from globjects::Referenced
| Referenced ()
void | ref () const
void | unref () const
int | refCounter () const
Public Member Functions inherited from globjects::HeapOnly
| HeapOnly ()
void | destroy () const

## Static Public Member Functions
static void | hintNameImplementation (NameImplementation impl)

## Protected Member Functions
| Object (IDResource *resource)
virtual | ~Object ()
Protected Member Functions inherited from globjects::Referenced
virtual | ~Referenced ()
Protected Member Functions inherited from globjects::HeapOnly
virtual | ~HeapOnly ()

## Protected Attributes
IDResource * | m_resource
void * | m_objectLabelState

## Friends
class | AbstractObjectNameImplementation

## Detailed Description

Superclass of all wrapped OpenGL objects.

The superclass is Referenced so that each wrapped OpenGL object supports reference counting. The OpenGL name (id) of the OpenGL resource that was provided in the constructor can be queried using id(). Additionally, an Object can have meaningful name wich can be get and set using name() and setName().

## Member Enumeration Documentation

## ◆ NameImplementation

enum globjects::Object::NameImplementation
| strong

Enumerator
DebugKHR |
Legacy |

## Constructor & Destructor Documentation

## ◆ Object()

globjects::Object::Object | ( | IDResource * | resource | ) |
| protected

## ◆ ~Object()

virtual globjects::Object::~Object | ( |  | ) |
| protected virtual

## Member Function Documentation

## ◆ hintNameImplementation()

static void globjects::Object::hintNameImplementation | ( | NameImplementation | impl | ) |
| static

## ◆ accept()

virtual void globjects::Object::accept | ( | ObjectVisitor & | visitor | ) |
| pure virtual

Implemented in globjects::Program, globjects::Query, globjects::Buffer, globjects::Shader, globjects::Framebuffer, globjects::TransformFeedback, globjects::Texture, globjects::VertexArray, globjects::ProgramPipeline, globjects::Sampler, and globjects::Renderbuffer.

## ◆ id()

gl::GLuint globjects::Object::id | ( |  | ) | const

## ◆ name()

std::string globjects::Object::name | ( |  | ) | const

## ◆ setName()

void globjects::Object::setName | ( | const std::string & | name | ) |

## ◆ hasName()

bool globjects::Object::hasName | ( |  | ) | const

## ◆ isDefault()

bool globjects::Object::isDefault | ( |  | ) | const

## ◆ objectType()

virtual gl::GLenum globjects::Object::objectType | ( |  | ) | const
| pure virtual

Implemented in globjects::Buffer, globjects::Program, globjects::Texture, globjects::Framebuffer, globjects::Query, globjects::VertexArray, globjects::Shader, globjects::TransformFeedback, globjects::ProgramPipeline, globjects::Sampler, and globjects::Renderbuffer.

## ◆ detach()

void globjects::Object::detach | ( |  | ) |

unlinks and destroys the associated opengl object

## Friends And Related Function Documentation

## ◆ AbstractObjectNameImplementation

friend class AbstractObjectNameImplementation
| friend

## Member Data Documentation

## ◆ m_resource

IDResource* globjects::Object::m_resource
| protected

## ◆ m_objectLabelState

void* globjects::Object::m_objectLabelState
| mutable protected

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

- Object.h