[glutils] Add FrameBuffer::sizef

This commit is contained in:
Gary Talent 2024-05-22 00:25:03 -05:00
parent 87416e13ee
commit af3bff1a3f

View File

@ -13,6 +13,7 @@
#include <ox/std/error.hpp>
#include <ox/std/size.hpp>
#include <ox/std/string.hpp>
#include <ox/std/vec.hpp>
#include <ox/std/vector.hpp>
namespace glutils {
@ -138,6 +139,14 @@ struct FrameBuffer {
return fbo.id;
}
[[nodiscard]]
constexpr ox::Vec2 sizef() const noexcept {
return {
static_cast<float>(width),
static_cast<float>(height),
};
}
[[nodiscard]]
constexpr ox::Size size() const noexcept {
return {