kanzi::GLFramebufferHandle Class Reference

GLFramebufferHandle manages RAII ownership for GL framebuffer object. More...

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

Public Member Functions

 GLFramebufferHandle ()
 Constructs an empty GLFramebufferHandle which does not own any GL framebuffer object. More...
 
 GLFramebufferHandle (Renderer *renderer)
 Creates a new GL framebuffer object with renderer and constructs a GLFramebufferHandle which owns it. More...
 
 GLFramebufferHandle (KZ_RV_REF(GLFramebufferHandle) other)
 Move constructor. More...
 
 ~GLFramebufferHandle ()
 Destructor. More...
 
unsigned int release ()
 Releases the ownership of the GL framebuffer if any. More...
 
void reset ()
 Destroys the GL framebuffer object currently managed by the GLFramebufferHandle (if any). More...
 
unsigned int get () const
 Returns GL handle to the framebuffer object. More...
 
GLFramebufferHandleoperator= (KZ_RV_REF(GLFramebufferHandle) other)
 Move operator. More...
 
 operator bool_type () const
 

Protected Member Functions

void deleteInternalHandle ()
 Deletes the internal framebuffer handle. More...
 

Friends

void swap (GLFramebufferHandle &left, GLFramebufferHandle &right)
 

Detailed Description

GLFramebufferHandle manages RAII ownership for GL framebuffer object.

Constructor & Destructor Documentation

kanzi::GLFramebufferHandle::GLFramebufferHandle ( )
explicit

Constructs an empty GLFramebufferHandle which does not own any GL framebuffer object.

kanzi::GLFramebufferHandle::GLFramebufferHandle ( Renderer renderer)
explicit

Creates a new GL framebuffer object with renderer and constructs a GLFramebufferHandle which owns it.

Parameters
rendererRenderer to use for allocating the handle.
kanzi::GLFramebufferHandle::GLFramebufferHandle ( KZ_RV_REF(GLFramebufferHandle other)
inline

Move constructor.

Parameters
otherSource framebuffer handle.
kanzi::GLFramebufferHandle::~GLFramebufferHandle ( )

Destructor.

Member Function Documentation

unsigned int kanzi::GLFramebufferHandle::release ( )

Releases the ownership of the GL framebuffer if any.

get() returns 0 after the call.

Returns
Handle to the GL framebuffer object.
void kanzi::GLFramebufferHandle::reset ( )

Destroys the GL framebuffer object currently managed by the GLFramebufferHandle (if any).

unsigned int kanzi::GLFramebufferHandle::get ( ) const
inline

Returns GL handle to the framebuffer object.

Returns
GL framebuffer handle or 0 if no GL framebuffer is owned.
GLFramebufferHandle& kanzi::GLFramebufferHandle::operator= ( KZ_RV_REF(GLFramebufferHandle other)
inline

Move operator.

Parameters
otherSource framebuffer handle.
Returns
This object.
kanzi::GLFramebufferHandle::operator bool_type ( ) const
inline
void kanzi::GLFramebufferHandle::deleteInternalHandle ( )
protected

Deletes the internal framebuffer handle.

Called other functions in the framebuffer handle.

Friends And Related Function Documentation

void swap ( GLFramebufferHandle left,
GLFramebufferHandle right 
)
friend

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