GLShaderHandle manages RAII ownership for GL shader object.
More...
#include <kanzi/core.ui/platform/graphics_backend/gl/gl_shader_handle.hpp>
GLShaderHandle manages RAII ownership for GL shader object.
kanzi::GLShaderHandle::GLShaderHandle |
( |
| ) |
|
|
explicit |
Constructs an empty GLShaderHandle which does not own any GL shader object.
Creates a new GL shader object with renderer and constructs a GLShaderHandle which owns it.
- Parameters
-
renderer | Renderer |
type | Type of GL shader to create |
kanzi::GLShaderHandle::~GLShaderHandle |
( |
| ) |
|
unsigned int kanzi::GLShaderHandle::release |
( |
| ) |
|
Releases the ownership of the GL shader if any.
get() returns 0 after the call.
- Returns
- Handle to the GL shader object
unsigned int kanzi::GLShaderHandle::get |
( |
| ) |
const |
|
inline |
Returns GL handle to the shader object or 0 if no GL shader is owned.
ShaderType kanzi::GLShaderHandle::getType |
( |
| ) |
const |
|
inline |
void kanzi::GLShaderHandle::reset |
( |
| ) |
|
Destroys the GL shader object currently managed by the GLShaderHandle (if any)
kanzi::GLShaderHandle::operator bool_type |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: