| 91 | } |
| 92 | |
| 93 | float GetRenderCameraEffectiveAspectRatio(HRenderContext render_context, HRenderCamera camera) |
| 94 | { |
| 95 | RenderCamera* c = render_context->m_RenderCameras.Get(camera); |
| 96 | |
| 97 | if (c->m_Data.m_AutoAspectRatio) |
| 98 | { |
| 99 | dmGraphics::HContext graphics_context = GetGraphicsContext(render_context); |
| 100 | float width = (float) dmGraphics::GetWindowWidth(graphics_context); |
| 101 | float height = (float) dmGraphics::GetWindowHeight(graphics_context); |
| 102 | return width / height; |
| 103 | } |
| 104 | else |
| 105 | { |
| 106 | return c->m_Data.m_AspectRatio; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | float GetRenderCameraOrthographicAutoZoom(HRenderContext render_context, HRenderCamera camera) |
| 111 | { |