Kanzi  3.9.5
Kanzi Engine API
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

unsigned int get () const
 Returns GL handle to the framebuffer object, or 0 if no GL framebuffer is owned. More...
 
 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 (GLFramebufferHandle &&other)
 Move constructor. More...
 
 operator bool_type () const
 
GLFramebufferHandleoperator= (GLFramebufferHandle &&other)
 Move operator. 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...
 
 ~GLFramebufferHandle ()
 

Friends

void swap (GLFramebufferHandle &left, GLFramebufferHandle &right)
 

Detailed Description

GLFramebufferHandle manages RAII ownership for GL framebuffer object.

Constructor & Destructor Documentation

◆ GLFramebufferHandle() [1/3]

kanzi::GLFramebufferHandle::GLFramebufferHandle ( )
explicit

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

◆ GLFramebufferHandle() [2/3]

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

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

Parameters
rendererRenderer

◆ ~GLFramebufferHandle()

kanzi::GLFramebufferHandle::~GLFramebufferHandle ( )

◆ GLFramebufferHandle() [3/3]

kanzi::GLFramebufferHandle::GLFramebufferHandle ( GLFramebufferHandle &&  other)
inline

Move constructor.

Parameters
otherSource framebuffer handle.

Member Function Documentation

◆ release()

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

◆ operator=()

GLFramebufferHandle& kanzi::GLFramebufferHandle::operator= ( GLFramebufferHandle &&  other)

Move operator.

Parameters
otherSource framebuffer handle.
Returns
This handle.

◆ get()

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

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

◆ reset()

void kanzi::GLFramebufferHandle::reset ( )

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

◆ operator bool_type()

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

Friends And Related Function Documentation

◆ swap

void swap ( GLFramebufferHandle left,
GLFramebufferHandle right 
)
friend

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