33 #define SHADER_SURFACE_VARIABLE_OWNED (0x00000001) 40 for (
uint32 i = 0; i < varCount; ++i) {
191 glDisable(GL_CULL_FACE);
203 glEnable(GL_CULL_FACE);
219 case SHADER_VEC2: rval =
new float[2 * count];
break;
220 case SHADER_VEC3: rval =
new float[3 * count];
break;
221 case SHADER_VEC4: rval =
new float[4 * count];
break;
222 case SHADER_INT: rval =
new int[count];
break;
234 case SHADER_MAT2: rval =
new float[4 * count];
break;
235 case SHADER_MAT3: rval =
new float[9 * count];
break;
236 case SHADER_MAT4: rval =
new float[16 * count];
break;
282 case SHADER_VEC4:
delete [] (
static_cast<float *
>(data));
break;
286 case SHADER_IVEC4:
delete [] (
static_cast<int *
>(data));
break;
297 case SHADER_MAT4:
delete [] (
static_cast<float *
>(data));
break;
The global graphics manager.
void * getVariableData(uint32 index) const
Shader::ShaderVariableType getVariableType(uint32 index) const
A class holding an UTF-8 string.
void bindTextureView(Shader::ShaderProgram *program, const glm::mat4 *t)
void setVariableExternal(uint32 index, void *loc)
Shader::ShaderObject * _vertShader
#define SHADER_SURFACE_NOCULL
#define SHADER_SURFACE_VARIABLE_OWNED
void bindProgram(Shader::ShaderProgram *program)
void delSurfaceVar(uint32 index)
uint32 _objectModelviewIndex
void setVariableInternal(uint32 index)
ShaderSurface(Shader::ShaderObject *vertShader, const Common::UString &name="unnamed")
ShaderVariableType
Enum of all supported shader variable parsing and automatic binding.
void addUBO(uint32 index, GLuint glid)
ShaderObject * vertexObject
uint32 getVariableCount() const
std::vector< ShaderSurfaceVariable > _variableData
void * genSurfaceVar(uint32 index)
#define ShaderMan
Shortcut for accessing the shader manager.
std::vector< GLint > vertexVariableLocations
bool isVariableOwned(uint32 index) const
Shader::ShaderObject * getVertexShader() const
uint32 getVariableFlags(uint32 index) const
void setFlags(uint32 flags)
const Common::UString & getName() const
#define GfxMan
Shortcut for accessing the graphics manager.
Shader surface, responsible for tracking data relating to a vertex shader.
std::vector< ShaderObject::ShaderObjectVariable > variablesCombined
std::vector< Shader::ShaderUBO > _uboArray
const Common::UString & getVariableName(uint32 index) const
void bindObjectModelview(Shader::ShaderProgram *program, const glm::mat4 *t)