16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 12:29:18 +02:00

feature: camera zoom

This commit is contained in:
tmj-fstate
2017-02-19 16:24:10 +01:00
parent 7e0aeb1bfa
commit 8ae135375e
7 changed files with 68 additions and 33 deletions

View File

@@ -85,17 +85,19 @@ int InitGL(GLvoid) // All Setup For OpenGL Goes Here
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // resize and initialize the GL Window
{
WindowWidth = width;
WindowHeight = height;
Global::ScreenWidth = WindowWidth = width;
Global::ScreenHeight = WindowHeight = height;
if (height == 0) // prevent a divide by zero by
height = 1; // making height equal one
glViewport(0, 0, width, height); // Reset The Current Viewport
/*
glMatrixMode(GL_PROJECTION); // select the Projection Matrix
glLoadIdentity(); // reset the Projection Matrix
// calculate the aspect ratio of the window
gluPerspective(45.0f, (GLdouble)width / (GLdouble)height, 0.2f, 2500.0f);
glMatrixMode(GL_MODELVIEW); // select the Modelview Matrix
glLoadIdentity(); // reset the Modelview Matrix
*/
}
//---------------------------------------------------------------------------