MeVisLab Resolution Independence API
Loading...
Searching...
No Matches
ml::GLSLProgram Class Reference

GLSL Program resource. More...

#include <mlGLResources.h>

Inheritance diagram for ml::GLSLProgram:
ml::GLResource

Public Member Functions

 GLSLProgram ()
 ~GLSLProgram () override
void disable ()
 Disables program.
void detachShader (GLSLShader &shader)
 Detaches the given shader (this is safe to be called outside of a valid GL context).
void detachShader (GLuint shader)
 Detaches the given shader (this is safe to be called outside of a valid GL context).
GLuint getHandle () const
 Returns the program's handle (you need to create() the buffer before you get a handle).
bool isValid () const
 Checks whether the program is valid.
void create ()
 Creates the program (requires valid GL context).
void destroy ()
 Destroys the resource.
void contextDestroyed () override
 Forgets the resource; the context was destroyed.
Public Member Functions inherited from ml::GLResource
 GLResource ()
virtual ~GLResource ()
 GLResource (const GLResource &)=delete
GLResource & operator= (const GLResource &)=delete
 GLResource (GLResource &&) noexcept=delete
GLResource & operator= (GLResource &&) noexcept=delete

Additional Inherited Members

Static Public Member Functions inherited from ml::GLResource
static GLenum getGLError ()
 Checks for OpenGL error (returns GL_INVALID_OPERATION if there is no valid OpenGL context).
Protected Attributes inherited from ml::GLResource
GLResource * _next
GLResource * _previous

Detailed Description

GLSL Program resource.

Definition at line 457 of file mlGLResources.h.

Constructor & Destructor Documentation

◆ GLSLProgram()

ml::GLSLProgram::GLSLProgram ( )
inline

Definition at line 460 of file mlGLResources.h.

◆ ~GLSLProgram()

ml::GLSLProgram::~GLSLProgram ( )
inlineoverride

Definition at line 464 of file mlGLResources.h.

References destroy().

Member Function Documentation

◆ contextDestroyed()

void ml::GLSLProgram::contextDestroyed ( )
inlineoverridevirtual

Forgets the resource; the context was destroyed.

Implements ml::GLResource.

Definition at line 497 of file mlGLResources.h.

◆ create()

void ml::GLSLProgram::create ( )

Creates the program (requires valid GL context).

◆ destroy()

void ml::GLSLProgram::destroy ( )

Destroys the resource.

Referenced by ~GLSLProgram().

◆ detachShader() [1/2]

void ml::GLSLProgram::detachShader ( GLSLShader & shader)

Detaches the given shader (this is safe to be called outside of a valid GL context).

◆ detachShader() [2/2]

void ml::GLSLProgram::detachShader ( GLuint shader)

Detaches the given shader (this is safe to be called outside of a valid GL context).

◆ disable()

void ml::GLSLProgram::disable ( )

Disables program.

◆ getHandle()

GLuint ml::GLSLProgram::getHandle ( ) const
inline

Returns the program's handle (you need to create() the buffer before you get a handle).

Definition at line 479 of file mlGLResources.h.

Referenced by SoGLShaderProgram::getProgramHandle().

◆ isValid()

bool ml::GLSLProgram::isValid ( ) const
inline

Checks whether the program is valid.

Definition at line 485 of file mlGLResources.h.


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