Revert example ``simple.c``

This commit is contained in:
Felipe Ferreira da Silva 2017-04-09 13:30:34 -03:00
parent a29f9f5ea4
commit 2050f1b7d8

View File

@ -79,7 +79,6 @@ int main(void)
GLFWwindow* window; GLFWwindow* window;
GLuint vertex_buffer, vertex_shader, fragment_shader, program; GLuint vertex_buffer, vertex_shader, fragment_shader, program;
GLint mvp_location, vpos_location, vcol_location; GLint mvp_location, vpos_location, vcol_location;
double start;
glfwSetErrorCallback(error_callback); glfwSetErrorCallback(error_callback);
@ -132,18 +131,12 @@ int main(void)
glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE, glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE,
sizeof(vertices[0]), (void*) (sizeof(float) * 2)); sizeof(vertices[0]), (void*) (sizeof(float) * 2));
start = glfwGetTime();
while (!glfwWindowShouldClose(window)) while (!glfwWindowShouldClose(window))
{ {
float ratio; float ratio;
int width, height; int width, height;
mat4x4 m, p, mvp; mat4x4 m, p, mvp;
if (glfwGetTime() - start > 10.0) {
glfwRequestWindowAttention(window);
start = glfwGetTime();
}
glfwGetFramebufferSize(window, &width, &height); glfwGetFramebufferSize(window, &width, &height);
ratio = width / (float) height; ratio = width / (float) height;