12 #include <glad/glad.h> 20 std::string NumberToString(T x)
22 std::ostringstream ss;
27 #define GET_FILE_LINE (std::string(__FILE__) + ":" + NumberToString(__LINE__)).c_str() 32 void checkError(
const char *str = 0);
33 void printProgramInfoLog(GLuint program);
34 void printShaderInfoLog(GLuint shader);
36 int textFileWrite(
const char *filename,
char *s);
37 char *textFileRead(
const char *filename);
38 char *textFileRead(FILE* file);
39 GLint getAttribLocation(
const GLuint program,
const char varname[],
bool verbose =
true);
40 GLint getUniformLocation(
const GLuint program,
const char varname[],
bool verbose =
true);
41 void enableVertexAttribArray(
const GLint handle);
42 void disableVertexAttribArray(
const GLint handle);
43 void vertexAttribPointer(
const GLint handle, GLint size, GLenum type, GLboolean normalized, GLsizei stride,
const GLvoid *pointer);
45 bool compileAndCheck(GLuint shader,
bool verbose);
46 bool linkAndCheck(GLuint program,
bool verbose);