src/glrenderer.cpp

changeset 1369
1e2391b78d17
parent 1326
69a90bd2dba2
child 1371
b8df4748d04e
equal deleted inserted replaced
1368:36105978da93 1369:1e2391b78d17
339 { 339 {
340 calcCameraIcons(); 340 calcCameraIcons();
341 glViewport (0, 0, width, height); 341 glViewport (0, 0, width, height);
342 glMatrixMode (GL_PROJECTION); 342 glMatrixMode (GL_PROJECTION);
343 glLoadIdentity(); 343 glLoadIdentity();
344 gluPerspective (45.0f, (double) width / (double) height, 1.0f, 10000.0f); 344 gluPerspective (45.0f, (double) width / (double) height, near, far);
345 glMatrixMode (GL_MODELVIEW); 345 glMatrixMode (GL_MODELVIEW);
346 346
347 // Unfortunately Qt does not provide a resized() signal so we have to manually feed the information. 347 // Unfortunately Qt does not provide a resized() signal so we have to manually feed the information.
348 for (GLCamera& camera : m_cameras) 348 for (GLCamera& camera : m_cameras)
349 camera.rendererResized(width, height); 349 camera.rendererResized(width, height);

mercurial