X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframeformat.h;fp=source%2Fcore%2Fframeformat.h;h=c80f63e0dd02518e00aa85f9f1eae75947beb564;hb=a4d83d3748cdde8cf30683d36a040d3dfacfd693;hp=35d982ba8839f1489b75efab9489560a7aa2d6e3;hpb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;p=libs%2Fgl.git diff --git a/source/core/frameformat.h b/source/core/frameformat.h index 35d982ba..c80f63e0 100644 --- a/source/core/frameformat.h +++ b/source/core/frameformat.h @@ -20,7 +20,7 @@ nnnn nn_f _sss _ccc This information is presented for internal documentation purposes only; it is inadvisable for programs to rely on it. */ -enum FrameAttachment +enum FrameAttachment: std::uint16_t { COLOR_ATTACHMENT = 0x0014, DEPTH_ATTACHMENT = 0xF941, @@ -38,7 +38,7 @@ private: std::uint8_t count; std::uint8_t samples; - std::uint16_t attachments[MAX_ATTACHMENTS]; + FrameAttachment attachments[MAX_ATTACHMENTS]; public: FrameFormat(); @@ -53,8 +53,8 @@ public: unsigned size() const { return count; } bool empty() const { return !count; } - const std::uint16_t *begin() const { return attachments; } - const std::uint16_t *end() const { return attachments+count; } + const FrameAttachment *begin() const { return attachments; } + const FrameAttachment *end() const { return attachments+count; } int index(FrameAttachment) const; }; @@ -71,10 +71,10 @@ FrameAttachment make_indexed_attachment(FrameAttachment, unsigned); inline FrameAttachment operator,(FrameAttachment fa, unsigned i) { return make_indexed_attachment(fa, i); } -inline unsigned get_attach_point(std::uint16_t fa) +inline unsigned get_attach_point(FrameAttachment fa) { return fa>>10; } -PixelFormat get_attachment_pixelformat(std::uint16_t); +PixelFormat get_attachment_pixelformat(FrameAttachment); GLenum get_gl_attachment(FrameAttachment);