Kanzi  3.9.7
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

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 ( 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= ( 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: