#ifndef CLIENT_RENDER_STRUCT_HH_ #define CLIENT_RENDER_STRUCT_HH_ //#include #include namespace client { namespace render { const glm::ivec2& get_window_size() noexcept; // forward declaration // Scale takes the range [0, 1] and represents an amount of the screen. // Offset is any value that is added after scale. struct relative_arg { glm::vec2 extent; glm::vec2 offset; glm::vec2 to_vec2() const noexcept { const glm::vec2& window = render::get_window_size(); const float x = this->extent.x * window.x + this->offset.x; const float y = this->extent.y * window.y + this->offset.y; return {x, y}; } }; } // namespace render } // namespace client #endif