gllyap.cpp
void Gllyap::set_viewport() {
	winh = (winh < 1)? 1: winh;
//	GLfloat ratio = GLfloat(winw) / GLfloat(winh);
	glViewport(0, 0, (GLsizei)winw, (GLsizei)winh);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	// set an orthogonal projection:
	glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
	// make sure we are changing the model view matrix and not projection:
	glMatrixMode(GL_MODELVIEW);
	// reset the view:
	glLoadIdentity();
}
// reset viewport after a window resize:
reset viewport after a window resize.
reset viewport after a window resize .
void Gllyap::set_viewport() {
	winh = (winh < 1)? 1: winh;
	glViewport(0, 0, (GLsizei)winw, (GLsizei)winh);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
}
void Gllyap :: set_viewport ( ) { winh = ( winh < 1 ) ? 1 : winh ; glViewport ( 0 , 0 , ( GLsizei ) winw , ( GLsizei ) winh ) ; glMatrixMode ( GL_PROJECTION ) ; glLoadIdentity ( ) ; glOrtho ( 0.0 , 1.0 , 0.0 , 1.0 , -1.0 , 1.0 ) ; glMatrixMode ( GL_MODELVIEW ) ; glLoadIdentity ( ) ; }
reset viewport after a window resize:
reset viewport after a window resize :
//	GLfloat ratio = GLfloat(winw) / GLfloat(winh); // set an orthogonal projection: // make sure we are changing the model view matrix and not projection: // reset the view: