Browse Source

SceneGraph: compute projection size from aspectratio-corrected matrix.

It isn't tested anywhere, because Camera is calling glViewport().
pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
8ca083691a
  1. 3
      src/SceneGraph/Camera.h

3
src/SceneGraph/Camera.h

@ -102,7 +102,8 @@ template<class MatrixType, class VectorType, class ObjectType, class SceneType,
* @see projectionMatrix() * @see projectionMatrix()
*/ */
inline Vector2 projectionSize() const { inline Vector2 projectionSize() const {
return {2.0f/rawProjectionMatrix[0].x(), 2.0f/rawProjectionMatrix[1].y()}; /** @todo Test this properly with fixAspectRatio() when Camera is free from gl*() calls */
return {2.0f/_projectionMatrix[0].x(), 2.0f/_projectionMatrix[1].y()};
} }
/** @brief Viewport size */ /** @brief Viewport size */

Loading…
Cancel
Save