#pragma once #include #include #include /** * Structure containing information about an OpenGL Shader. For simplicity sake * we demand certain uninforms to be present on the shader target. */ typedef struct { /** Pointer to an uploaded vertex shader program */ unsigned int shaderVertex; /** Pointer to an uploaded fragment shader program */ unsigned int shaderFrag; /** Pointer to an uploaded shader program linked */ unsigned int shaderProgram; } shader_t; /** * Create a shader from vertex and fragment shader code. * * @param vertexShaderSource The raw vertex shader code. * @param fragmentShaderSource The raw fragment shader code. * @return Pointer to the loaded shader. */ shader_t * shaderCompile(char *vertexShaderSource, char* fragmentShaderSource); /** * Cleanup and unload a previously loaded shader. * * @param shader The shader to unload * @return True if successfully disposed. */ bool shaderDipose(shader_t *shader);