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:
6
EU07.cpp
6
EU07.cpp
@@ -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
|
||||
*/
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user