#ifndef RTS_GLSHADERUNIFORM_H #define RTS_GLSHADERUNIFORM_H #include "CHECK_OPENGL_ERROR.h" #include #include using namespace std; enum rtsUniformEnum {RTS_FLOAT, RTS_INT, RTS_BOOL, RTS_FLOAT_MATRIX}; ///This class stores a single uniform variable for GLSL and is designed to be used by the rts_glShaderProgram class. struct rts_glShaderUniform { public: string name; //the name of the variable GLint location; //the location in the program void* p_value; //pointer to the global data representing the value in main memory GLenum type; //variable type (float, int, vec2, etc.) //rtsUniformEnum rts_type; //type of variable in rts format //unsigned int num; //the number of values required by the variable (1 for float, 2 for vec2, etc.) string log; //void convert_type(GLenum gl_type); //converts the OpenGL data type to something useful for rts void submit_to_gpu() { if(location < 0) return; if(p_value == NULL) { cout<<"Error in uniform address: "<