[glutils] Add size function to FrameBuffer

This commit is contained in:
Gary Talent 2024-05-19 22:13:57 -05:00
parent df412cf8d0
commit 6df77a23ab
2 changed files with 10 additions and 2 deletions

View File

@ -137,6 +137,14 @@ struct FrameBuffer {
constexpr operator const GLuint&() const noexcept {
return fbo.id;
}
[[nodiscard]]
constexpr ox::Size size() const noexcept {
return {
width,
height,
};
}
};
class FrameBufferBind {

View File

@ -204,12 +204,12 @@ constexpr T &SmallMap<K, T, SmallSz>::value(size_t i) noexcept {
}
template<typename K, typename T, size_t SmallSz>
constexpr typename SmallMap<K, T, SmallSz>::Pair const&SmallMap<K, T, SmallSz>::get(size_t i) const noexcept {
constexpr SmallMap<K, T, SmallSz>::Pair const&SmallMap<K, T, SmallSz>::get(size_t i) const noexcept {
return m_pairs[i];
}
template<typename K, typename T, size_t SmallSz>
constexpr typename SmallMap<K, T, SmallSz>::Pair &SmallMap<K, T, SmallSz>::get(size_t i) noexcept {
constexpr SmallMap<K, T, SmallSz>::Pair &SmallMap<K, T, SmallSz>::get(size_t i) noexcept {
return m_pairs[i];
}