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 ()
 
unsigned int release ()
 Releases the ownership of the GL framebuffer if any. More...
 
 GLFramebufferHandle (KZ_RV_REF(GLFramebufferHandle) other)
 
GLFramebufferHandleoperator= (KZ_RV_REF(GLFramebufferHandle) other)
 
unsigned int get () const
 Returns GL handle to the framebuffer object, or 0 if no GL framebuffer is owned. More...
 
void reset ()
 Destroys the GL framebuffer object currently managed by the GLFramebufferHandle (if any) More...
 
 operator bool_type () const
 

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
kanzi::GLFramebufferHandle::~GLFramebufferHandle ( )
kanzi::GLFramebufferHandle::GLFramebufferHandle ( KZ_RV_REF(GLFramebufferHandle other)
inline

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
GLFramebufferHandle& kanzi::GLFramebufferHandle::operator= ( KZ_RV_REF(GLFramebufferHandle other)
inline
unsigned int kanzi::GLFramebufferHandle::get ( ) const
inline

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

void kanzi::GLFramebufferHandle::reset ( )

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

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

Friends And Related Function Documentation

void swap ( GLFramebufferHandle left,
GLFramebufferHandle right 
)
friend

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