diff --git a/src/ruis/render/context.hpp b/src/ruis/render/context.hpp index 83a11936d..8b1ac5f0f 100644 --- a/src/ruis/render/context.hpp +++ b/src/ruis/render/context.hpp @@ -204,10 +204,7 @@ class context : public std::enable_shared_from_this * @brief Get window coordinates of a point in renderer's clipping coordinates. * Renderer's clipping coordinates of a point are coordinates after all matrix transformations * and perspective division. - * The window coordinate system is renderer-specific. It can be top-bottom or bottom-top. - * For example, OpenGL/ES renderer has bottom-top coordinate system, i.e. origin is - * at the bottom left corner of the window and y-axis goes up. So, the resulting position of a point - * should be interpreted in context of the specific renderer. + * The window coordinate system is always top-left origin (x right, y down). * @return Window coordinates of the point. */ virtual r4::vector2 to_window_coords(const ruis::vec2& point) const = 0; @@ -228,8 +225,7 @@ class context : public std::enable_shared_from_this /** * @brief Get scissor rectangle. * Get scissor rectangle in application window coordinates. - * TODO: - * + * The window coordinate system is always top-left origin (x right, y down). * @return Current scissor rectangle. */ virtual r4::rectangle get_scissor() const = 0; @@ -237,7 +233,7 @@ class context : public std::enable_shared_from_this /** * @brief Set scissor rectangle. * Set scissor rectangle in application window coordinates. - * TODO: + * The window coordinate system is always top-left origin (x right, y down). * @param r - new scissor rectangle. */ virtual void set_scissor(const r4::rectangle& r) = 0; @@ -245,10 +241,7 @@ class context : public std::enable_shared_from_this /** * @brief Get current rendering viewport within application window. * Get the rendering viewport rectangle in application window coordinates. - * The window coordinate system is renderer-specific. It can be top-bottom or bottom-top. - * For example, OpenGL/ES renderer has bottom-top coordinate system, i.e. origin is - * at the bottom left corner of the window and y-axis goes up. So, the viewport's position - * should be interpreted in context of the specific renderer. + * The window coordinate system is always top-left origin (x right, y down). * The viewport's dimensions are renderer-agnostic. * @return Current rendering viewport rectangle. */ @@ -257,11 +250,10 @@ class context : public std::enable_shared_from_this /** * @brief Set rendering viewport within application window. - * Since application window's coordinate system is renderer-specific - * (see description of get_viewport() for details), the meaning of the viewport rectangle's - * position is also renderer-specific. Though, the position of (0, 0) in combination with - * framebuffer's dimensions can safely be used regardless of the renderer to set the viewport - * covering the whole framebuffer. + * The viewport rectangle is specified in top-left origin window coordinates + * (x right, y down). The position of (0, 0) in combination with the + * framebuffer's dimensions can safely be used regardless of the renderer + * to set the viewport covering the whole framebuffer. * @param r - new viewport rectangle. */ virtual void set_viewport(const r4::rectangle& r) = 0;