Added glfwGetCurrentWindow.

This commit is contained in:
Camilla Berglund
2010-10-04 23:13:33 +02:00
parent f73f01b68c
commit 419f9f17a1
4 changed files with 23 additions and 0 deletions
+5
View File
@@ -72,6 +72,11 @@ static GLuint create_texture(void)
static void draw_quad(GLuint texture)
{
int width, height;
glfwGetWindowSize(glfwGetCurrentWindow(), &width, &height);
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.f, 1.f, 0.f, 1.f);