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); |