Recizing Window

Started by technik3k, September 12, 2015, 17:08:04

Previous topic - Next topic

quew8

Well then I can't see why my code would not be working.

BTW, gfwWindowHint() should be called before glfwCreateWindow(). It specifies hints to create the window with.

technik3k

I fuigured it out ! ! !
I did't have my code in the right order. I payed orund with it and I got it. Here it is:
glViewport(0, 0, w, h);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		glOrtho(0, w, 0, h, -1, 1);
		glMatrixMode(GL_MODELVIEW);
		glLoadIdentity();

Thanks for all the help ! ! !  ;D :o ::)

quew8

To clarify, you moved "glMatrixMode(GL_PROJECTION)" to after "glViewport()" and that is what made it work?