|
|
|
@ -12,6 +12,7 @@
|
|
|
|
|
#define GLEW_STATIC
|
|
|
|
|
#include <GL/glew.h>
|
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
|
#define OFFSETOF(TYPE, ELEMENT) ((size_t)&(((TYPE *)0)->ELEMENT))
|
|
|
|
|
|
|
|
|
|
static GLFWwindow* window;
|
|
|
|
|
static GLuint fontTex;
|
|
|
|
@ -233,9 +234,9 @@ void InitGL()
|
|
|
|
|
glEnableVertexAttribArray(uv_location);
|
|
|
|
|
glEnableVertexAttribArray(colour_location);
|
|
|
|
|
|
|
|
|
|
glVertexAttribPointer(position_location, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*) offsetof(ImDrawVert, pos));
|
|
|
|
|
glVertexAttribPointer(uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*) offsetof(ImDrawVert, uv));
|
|
|
|
|
glVertexAttribPointer(colour_location, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*) offsetof(ImDrawVert, col));
|
|
|
|
|
glVertexAttribPointer(position_location, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)OFFSETOF(ImDrawVert, pos));
|
|
|
|
|
glVertexAttribPointer(uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)OFFSETOF(ImDrawVert, uv));
|
|
|
|
|
glVertexAttribPointer(colour_location, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)OFFSETOF(ImDrawVert, col));
|
|
|
|
|
glBindVertexArray(0);
|
|
|
|
|
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
|
|
|
|
}
|
|
|
|
|