kanzi::GLRenderbufferHandle Class Reference

GLRenderbufferHandle manages RAII ownership for GL renderbuffer object. More...

#include <kanzi/core.ui/platform/graphics_backend/gl/gl_renderbuffer_handle.hpp>

Public Member Functions

 GLRenderbufferHandle ()
 Constructs an empty GLRenderbufferHandle which does not own any GL renderbuffer object. More...
 
 GLRenderbufferHandle (Renderer *renderer)
 Creates a new GL renderbuffer object with renderer and constructs a GLRenderbufferHandle which owns it. More...
 
 ~GLRenderbufferHandle ()
 
unsigned int release ()
 Releases the ownership of the GL renderbuffer if any. More...
 
 GLRenderbufferHandle (KZ_RV_REF(GLRenderbufferHandle) other)
 
GLRenderbufferHandleoperator= (KZ_RV_REF(GLRenderbufferHandle) other)
 
unsigned int get () const
 Returns GL handle to the renderbuffer object, or 0 if no GL renderbuffer is owned. More...
 
void reset ()
 Destroys the GL renderbuffer object currently managed by the GLRenderbufferHandle (if any) More...
 
 operator bool_type () const
 

Friends

void swap (GLRenderbufferHandle &left, GLRenderbufferHandle &right)
 

Detailed Description

GLRenderbufferHandle manages RAII ownership for GL renderbuffer object.

Constructor & Destructor Documentation

kanzi::GLRenderbufferHandle::GLRenderbufferHandle ( )
explicit

Constructs an empty GLRenderbufferHandle which does not own any GL renderbuffer object.

kanzi::GLRenderbufferHandle::GLRenderbufferHandle ( Renderer renderer)
explicit

Creates a new GL renderbuffer object with renderer and constructs a GLRenderbufferHandle which owns it.

Parameters
rendererRenderer
kanzi::GLRenderbufferHandle::~GLRenderbufferHandle ( )
kanzi::GLRenderbufferHandle::GLRenderbufferHandle ( KZ_RV_REF(GLRenderbufferHandle other)
inline

Member Function Documentation

unsigned int kanzi::GLRenderbufferHandle::release ( )

Releases the ownership of the GL renderbuffer if any.

get() returns 0 after the call.

Returns
Handle to the GL renderbuffer object
GLRenderbufferHandle& kanzi::GLRenderbufferHandle::operator= ( KZ_RV_REF(GLRenderbufferHandle other)
inline
unsigned int kanzi::GLRenderbufferHandle::get ( ) const
inline

Returns GL handle to the renderbuffer object, or 0 if no GL renderbuffer is owned.

void kanzi::GLRenderbufferHandle::reset ( )

Destroys the GL renderbuffer object currently managed by the GLRenderbufferHandle (if any)

kanzi::GLRenderbufferHandle::operator bool_type ( ) const
inline

Friends And Related Function Documentation

void swap ( GLRenderbufferHandle left,
GLRenderbufferHandle right 
)
friend

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