7#include "../GLProgramHandle.h"
112 const mat4& projection,
const mat4& transform);
134 const std::vector<mat4>& jointMatrix);
136 static void BindAttributeToPlane();
138 static void BindAttributeToCubeMap();
146 static std::string m_defineVersion;
This class provides utility functions for shaders.
static void BindVariables(GLProgramHandle *handle)
Binds variables to the shader.
static GLProgramHandle * CreateProgramHandle(const GLchar *vertexSource, const GLchar *fragmentSource, GLProgramHandle *handle=nullptr)
Creates a program handle.
static void BindAttributeToShader(const GLProgramHandle &handle, const GLMeshID &meshId)
Binds the attributes to the shader.
ShaderUtil()
Constructor for the ShaderUtil class.
static std::map< std::string, std::string > GetImportantVariables(const GLchar *source)
Gets the important variables from the shader source code.
~ShaderUtil()
Destructor for the ShaderUtil class.
static GLuint loadShader(GLenum shaderType, const char *pSource, const GLProgramHandle &handle)
Loads a shader.
static GLuint createProgram(const GLchar *vertexSource, const GLchar *fragmentSource, const GLProgramHandle &handle)
Creates a program.
static void BindSkinningDataToShader(const GLProgramHandle &handle, const GLMeshID &meshId, const std::vector< mat4 > &jointMatrix)
Binds the skinning data to the shader.
static void BindCameraToShader(const GLProgramHandle &handle, const mat4 &camera, const vec3 &cameraPosition, const mat4 &projection, const mat4 &transform)
Binds the camera data to the shader.