| 94 | } |
| 95 | |
| 96 | void SimpleOpenGL2Renderer::updateCamera(int upAxis) |
| 97 | { |
| 98 | float projection[16]; |
| 99 | float view[16]; |
| 100 | getActiveCamera()->setAspectRatio((float)m_data->m_width / (float)m_data->m_height); |
| 101 | getActiveCamera()->setCameraUpAxis(upAxis); |
| 102 | m_data->m_camera.update(); //?? |
| 103 | getActiveCamera()->getCameraProjectionMatrix(projection); |
| 104 | getActiveCamera()->getCameraViewMatrix(view); |
| 105 | GLfloat projMat[16]; |
| 106 | GLfloat viewMat[16]; |
| 107 | for (int i = 0; i < 16; i++) |
| 108 | { |
| 109 | viewMat[i] = view[i]; |
| 110 | projMat[i] = projection[i]; |
| 111 | } |
| 112 | glMatrixMode(GL_PROJECTION); |
| 113 | glLoadIdentity(); |
| 114 | glMultMatrixf(projMat); |
| 115 | |
| 116 | glMatrixMode(GL_MODELVIEW); |
| 117 | glLoadIdentity(); |
| 118 | glMultMatrixf(viewMat); |
| 119 | } |
| 120 | |
| 121 | void SimpleOpenGL2Renderer::removeAllInstances() |
| 122 | { |
nothing calls this directly
no test coverage detected