API Documentation
Loading...
Searching...
No Matches
GLESShader Class Reference

#include <GLESShader.h>

Collaboration diagram for GLESShader:
[legend]

Public Types

enum  ShaderType {
  e_simple_points , e_points , e_linework , e_solid ,
  e_solid_grid , e_solid_texture , e_shader_type_size , e_all
}
 
enum  ShaderPart { Vertex , Fragment , Geometry }
 

Public Member Functions

 GLESShader (ShaderType type, bool is_integer, const DynamicPointer< GLESGraphicsDevice > &device)
 
void compileAndLink ()
 
void compile (ShaderPart type, const char *src)
 
void linkShader ()
 
 ~GLESShader ()
 
void compileShader (ShaderPart type, const String &shader)
 
String versionedShaderCode (ShaderPart type, const char *src) const
 
int uniformLocation (const char *const location) const
 
uint04 id () const
 
template<class t_type >
void setUniformValue (const char *const location, const t_type &value)
 
void setUniformValue (int location, const Vector< 3, sint04 > &value)
 
void setUniformValue (int location, const Vector< 3, fltp04 > &value)
 
void setUniformValue (int location, const Vector< 4, sint04 > &value)
 
void setUniformValue (int location, const Vector< 4, fltp04 > &value)
 
void setUniformValue (int location, const Matrix< fltp04 > &value)
 
void setUniformValue (int location, const fltp04 &value)
 
void setUniformValue (int location, const uint04 &value)
 
void setUniformValue (int location, const RGBColor &value)
 
void setUniformValue (int location, const Buffer< fltp04 > &value)
 
template<size_t t_size>
void setUniformValue (int location, const fltp04(&value)[t_size])
 
template<size_t t_size>
void setUniformValue (int location, const uint04(&value)[t_size])
 
template<size_t t_size>
void setUniformValue (int location, const RGBColor(&value)[t_size])
 
template<uint01 t_size>
void setUniformValue (int location, const Vector< t_size, fltp04 > &value)
 
template<uint01 t_size>
void setUniformValue (int location, const Vector< t_size, RGBColor > &value)
 
void bind ()
 

Protected Member Functions

void checkCompileErrors (GLuint shader, String type) const
 

Protected Attributes

uint04 m_program_id = Constant<uint04>::NaN
 
uint04 m_fragment = Constant<uint04>::NaN
 
uint04 m_vertex = Constant<uint04>::NaN
 
uint04 m_geometry = Constant<uint04>::NaN
 
Dictionary< uint04, int > m_shader_variables
 
DynamicPointer< GLESGraphicsDevicem_device
 
ShaderType m_shader_type
 
bool m_is_int = false
 

Member Enumeration Documentation

◆ ShaderPart

enum ShaderPart
Enumerator
Vertex 
Fragment 
Geometry 

◆ ShaderType

enum ShaderType
Enumerator
e_simple_points 
e_points 
e_linework 
e_solid 
e_solid_grid 
e_solid_texture 
e_shader_type_size 
e_all 

Constructor & Destructor Documentation

◆ GLESShader()

GLESShader ( ShaderType type,
bool is_integer,
const DynamicPointer< GLESGraphicsDevice > & device )
inline

◆ ~GLESShader()

~GLESShader ( )
inline

Member Function Documentation

◆ bind()

void bind ( )
inline

◆ checkCompileErrors()

void checkCompileErrors ( GLuint shader,
String type ) const
inlineprotected

◆ compile()

void compile ( ShaderPart type,
const char * src )
inline

◆ compileAndLink()

void compileAndLink ( )
inline

◆ compileShader()

void compileShader ( ShaderPart type,
const String & shader )
inline

◆ id()

uint04 id ( ) const
inline

◆ linkShader()

void linkShader ( )
inline

◆ setUniformValue() [1/15]

template<class t_type >
void setUniformValue ( const char *const location,
const t_type & value )
inline

◆ setUniformValue() [2/15]

void setUniformValue ( int location,
const Buffer< fltp04 > & value )
inline

◆ setUniformValue() [3/15]

void setUniformValue ( int location,
const fltp04 & value )
inline

◆ setUniformValue() [4/15]

template<size_t t_size>
void setUniformValue ( int location,
const fltp04(&) value[t_size] )
inline

◆ setUniformValue() [5/15]

void setUniformValue ( int location,
const Matrix< fltp04 > & value )
inline

◆ setUniformValue() [6/15]

void setUniformValue ( int location,
const RGBColor & value )
inline

◆ setUniformValue() [7/15]

template<size_t t_size>
void setUniformValue ( int location,
const RGBColor(&) value[t_size] )
inline

◆ setUniformValue() [8/15]

void setUniformValue ( int location,
const uint04 & value )
inline

◆ setUniformValue() [9/15]

template<size_t t_size>
void setUniformValue ( int location,
const uint04(&) value[t_size] )
inline

◆ setUniformValue() [10/15]

void setUniformValue ( int location,
const Vector< 3, fltp04 > & value )
inline

◆ setUniformValue() [11/15]

void setUniformValue ( int location,
const Vector< 3, sint04 > & value )
inline

◆ setUniformValue() [12/15]

void setUniformValue ( int location,
const Vector< 4, fltp04 > & value )
inline

◆ setUniformValue() [13/15]

void setUniformValue ( int location,
const Vector< 4, sint04 > & value )
inline

◆ setUniformValue() [14/15]

template<uint01 t_size>
void setUniformValue ( int location,
const Vector< t_size, fltp04 > & value )
inline

◆ setUniformValue() [15/15]

template<uint01 t_size>
void setUniformValue ( int location,
const Vector< t_size, RGBColor > & value )
inline

◆ uniformLocation()

int uniformLocation ( const char *const location) const
inline

◆ versionedShaderCode()

String versionedShaderCode ( ShaderPart type,
const char * src ) const
inline

Member Data Documentation

◆ m_device

DynamicPointer<GLESGraphicsDevice> m_device
protected

◆ m_fragment

uint04 m_fragment = Constant<uint04>::NaN
protected

◆ m_geometry

uint04 m_geometry = Constant<uint04>::NaN
protected

◆ m_is_int

bool m_is_int = false
protected

◆ m_program_id

uint04 m_program_id = Constant<uint04>::NaN
protected

◆ m_shader_type

ShaderType m_shader_type
protected

◆ m_shader_variables

Dictionary<uint04, int> m_shader_variables
mutableprotected

◆ m_vertex

uint04 m_vertex = Constant<uint04>::NaN
protected

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