8#include <QOpenGLContext>
44 template<
class t_type>
52 template<
size_t t_size>
55 m_device->glUniform1fv(location, t_size, &value[0]);
57 template<
size_t t_size>
60 m_device->glUniform1uiv(location, t_size, &value[0]);
62 template<
size_t t_size>
65 m_device->glUniform1uiv(location, t_size, &value[0]);
67 template<u
int01 t_size>
70 m_device->glUniform1fv(location, t_size, &value[0]);
72 template<u
int01 t_size>
75 m_device->glUniform1uiv(location, t_size, (
uint04*)&value[0]);
88 void checkCompileErrors(GLuint shader,
String type)
const;
97 bool m_is_int =
false;
111 return m_int_shaders;
115 return m_flt_shaders;
121 auto iter = m_int_shaders.find(
id);
122 if (iter != m_int_shaders.end())
125 m_int_shaders[id] =
shader;
130 auto iter = m_flt_shaders.find(
id);
131 if (iter != m_flt_shaders.end())
134 m_flt_shaders[id] =
shader;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
A Shader for rendering default OpenGL logic to the graphics card.
Definition GLESShader.h:16
void setUniformValue(int location, const uint04(&value)[t_size])
Definition GLESShader.h:58
void setUniformValue(int location, const Vector< 4, sint04 > &value)
void compileShader(ShaderPart type, const String &shader)
void setUniformValue(int location, const Vector< 4, fltp04 > &value)
String versionedShaderCode(ShaderPart type, const char *src) const
void setUniformValue(int location, const Vector< t_size, RGBColor > &value)
Definition GLESShader.h:73
void compile(ShaderPart type, const char *src)
ShaderType
Definition GLESShader.h:19
@ e_simple_points
Definition GLESShader.h:20
@ e_solid
Definition GLESShader.h:23
@ e_solid_grid
Definition GLESShader.h:24
@ e_linework
Definition GLESShader.h:22
@ e_solid_texture
Definition GLESShader.h:25
@ e_points
Definition GLESShader.h:21
@ e_all
Definition GLESShader.h:27
@ e_shader_type_size
Definition GLESShader.h:26
ShaderPart
Definition GLESShader.h:30
@ Fragment
Definition GLESShader.h:32
@ Vertex
Definition GLESShader.h:31
void setUniformValue(const char *const location, const t_type &value)
Definition GLESShader.h:45
GLESShader(ShaderType type, bool is_integer, const DynamicPointer< GLESGraphicsDevice > &device)
void setUniformValue(int location, const Vector< 3, sint04 > &value)
void setUniformValue(int location, const Buffer< fltp04 > &value)
void setUniformValue(int location, const Matrix< fltp04 > &value)
void setUniformValue(int location, const fltp04(&value)[t_size])
Definition GLESShader.h:53
int uniformLocation(const char *const location) const
void setUniformValue(int location, const fltp04 &value)
void setUniformValue(int location, const RGBColor(&value)[t_size])
Definition GLESShader.h:63
void setUniformValue(int location, const Vector< t_size, fltp04 > &value)
Definition GLESShader.h:68
void setUniformValue(int location, const Vector< 3, fltp04 > &value)
void setUniformValue(int location, const uint04 &value)
void setUniformValue(int location, const RGBColor &value)
Manages all shaders used with OpenGL and the NDEVR API.
Definition GLESShader.h:103
const Dictionary< GLESShader::ShaderType, DynamicPointer< GLESShader > > & integerShaders() const
Definition GLESShader.h:109
GLESShaderManager(const DynamicPointer< GLESGraphicsDevice > &device)
Definition GLESShader.h:105
const Dictionary< GLESShader::ShaderType, DynamicPointer< GLESShader > > & floatShaders() const
Definition GLESShader.h:113
DynamicPointer< GLESShader > shader(const GLESShader::ShaderType &id, bool is_int)
Definition GLESShader.h:117
DynamicPointer< GLESShader > createShader(const GLESShader::ShaderType &id, bool is_int)
Definition GLESShader.h:138
A core class within the model heirarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:64
Definition Matrix.hpp:176
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
The core String class for the NDEVR API.
Definition String.h:69
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233