Open CASCADE Technology  7.4.0
Public Member Functions | Static Public Attributes

OpenGl_ShaderUniformLocation Class Reference

Simple class represents GLSL program variable location. More...

#include <OpenGl_ShaderProgram.hxx>

Public Member Functions

 OpenGl_ShaderUniformLocation ()
 Construct an invalid location. More...
 
 OpenGl_ShaderUniformLocation (GLint theLocation)
 Constructor with initialization. More...
 
bool IsValid () const
 Note you may safely put invalid location in functions like glUniform* - the data passed in will be silently ignored. More...
 
 operator bool () const
 Return TRUE for non-invalid location. More...
 
 operator GLint () const
 Convert operators help silently put object to GL functions like glUniform*. More...
 

Static Public Attributes

static const GLint INVALID_LOCATION = -1
 Invalid location of uniform/attribute variable. More...
 

Detailed Description

Simple class represents GLSL program variable location.

Constructor & Destructor Documentation

◆ OpenGl_ShaderUniformLocation() [1/2]

OpenGl_ShaderUniformLocation::OpenGl_ShaderUniformLocation ( )
inline

Construct an invalid location.

◆ OpenGl_ShaderUniformLocation() [2/2]

OpenGl_ShaderUniformLocation::OpenGl_ShaderUniformLocation ( GLint  theLocation)
inlineexplicit

Constructor with initialization.

Member Function Documentation

◆ IsValid()

bool OpenGl_ShaderUniformLocation::IsValid ( ) const
inline

Note you may safely put invalid location in functions like glUniform* - the data passed in will be silently ignored.

Returns
true if location is not equal to -1.

◆ operator bool()

OpenGl_ShaderUniformLocation::operator bool ( ) const
inline

Return TRUE for non-invalid location.

◆ operator GLint()

OpenGl_ShaderUniformLocation::operator GLint ( ) const
inline

Convert operators help silently put object to GL functions like glUniform*.

Field Documentation

◆ INVALID_LOCATION

const GLint OpenGl_ShaderUniformLocation::INVALID_LOCATION = -1
static

Invalid location of uniform/attribute variable.


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