void Frustum::ExtractFromOGLState() { Matrix44f modelview; Matrix44f projection; glGetFloatv(GL_MODELVIEW_MATRIX, modelview.get_ptr()); glGetFloatv(GL_PROJECTION_MATRIX, projection.get_ptr()); Extract(projection * modelview); }
void DrawRaytraceVolume() { glLoadIdentity(); Matrix44f modelview; m_camera.GetMatrix(&modelview); Matrix44f projection; glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f, Projection::AspectRatio(width(), height()), 0.1, 100.0f); glGetFloatv(GL_PROJECTION_MATRIX, projection.get_ptr()); glMatrixMode(GL_MODELVIEW); #if 0 Projection proj(45.0f, Projection::AspectRatio(width(), height()), 0.1f, 100.0f); proj.GetMatrix(&projection); #endif m_rt_vol_renderer.set_light_pos(m_sphere_pos); m_rt_vol_renderer.Render(modelview, projection); }