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

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

Friends

void swap (GLProgramHandle &left, GLProgramHandle &right)
 

Detailed Description

GLProgramHandle manages RAII ownership for GL program object.

Constructor & Destructor Documentation

kanzi::GLProgramHandle::GLProgramHandle ( )
explicit

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

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

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

kanzi::GLProgramHandle::~GLProgramHandle ( )
kanzi::GLProgramHandle::GLProgramHandle ( KZ_RV_REF(GLProgramHandle other)
inlineexplicit

Member Function Documentation

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

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

void kanzi::GLProgramHandle::reset ( )

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

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

Friends And Related Function Documentation

void swap ( GLProgramHandle left,
GLProgramHandle right 
)
friend

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