Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::GLProgramHandle Class Reference

GLProgramHandle manages RAII ownership for GL program object. More...

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

Public Member Functions

unsigned int get () const
 Returms GL handle to the program object or 0 if no GL program is owned. More...
 
 GLProgramHandle ()
 Creates an empty GL program handle which does not own anything. More...
 
 GLProgramHandle (kanzi::Renderer *renderer)
 Creates a new GL program object with renderer and constructs a GLProgramHandle which owns it. More...
 
 GLProgramHandle (GLProgramHandle &&other)
 
 operator bool_type () const
 
GLProgramHandleoperator= (GLProgramHandle &&other)
 
unsigned int release ()
 Releases the ownership of the GL program if any. More...
 
void reset ()
 Destroys the GL program object currently managed by the GLProgramHandle (if any) More...
 
 ~GLProgramHandle ()
 

Friends

void swap (GLProgramHandle &left, GLProgramHandle &right)
 

Detailed Description

GLProgramHandle manages RAII ownership for GL program object.

Constructor & Destructor Documentation

◆ GLProgramHandle() [1/3]

kanzi::GLProgramHandle::GLProgramHandle ( )
explicit

Creates an empty GL program handle which does not own anything.

◆ GLProgramHandle() [2/3]

kanzi::GLProgramHandle::GLProgramHandle ( kanzi::Renderer renderer)
explicit

Creates a new GL program object with renderer and constructs a GLProgramHandle which owns it.

◆ ~GLProgramHandle()

kanzi::GLProgramHandle::~GLProgramHandle ( )

◆ GLProgramHandle() [3/3]

kanzi::GLProgramHandle::GLProgramHandle ( GLProgramHandle &&  other)
inlineexplicit

Member Function Documentation

◆ release()

unsigned int kanzi::GLProgramHandle::release ( )

Releases the ownership of the GL program if any.

get() returns 0 after the call.

Returns
Handle to the GL program object

◆ operator=()

GLProgramHandle& kanzi::GLProgramHandle::operator= ( GLProgramHandle &&  other)
inline

◆ get()

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

Returms GL handle to the program object or 0 if no GL program is owned.

◆ reset()

void kanzi::GLProgramHandle::reset ( )

Destroys the GL program object currently managed by the GLProgramHandle (if any)

◆ operator bool_type()

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

Friends And Related Function Documentation

◆ swap

void swap ( GLProgramHandle left,
GLProgramHandle right 
)
friend

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