/** * Copyright (c) 2021 Dominic Msters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" #define SHADER_UNI_VIEW "u_View" #define SHADER_UNI_PROJ "u_Proj" #define SHADER_UNI_TEXT "u_Text" #define SHADER_UNI_MODL "u_Modl" /** * 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 */ GLuint shaderVertex; /** Pointer to an uploaded fragment shader program */ GLuint shaderFrag; /** Pointer to an uploaded shader program linked */ GLuint shaderProgram; /** Matrix for the view matrix */ GLint uniView; /** Matrix for the projection matrix */ GLint uniProj; /** Uniform for the current texture */ GLint uniText; /** Uniform for the current model world position */ GLint uniModl; } shader_t;