X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fframeformat.h;h=35d982ba8839f1489b75efab9489560a7aa2d6e3;hp=45ea9198cd772b1adc3f370307df1ee4a9b17971;hb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;hpb=6353307898cd397e2bcde13e2448a8a678a60004 diff --git a/source/core/frameformat.h b/source/core/frameformat.h index 45ea9198..35d982ba 100644 --- a/source/core/frameformat.h +++ b/source/core/frameformat.h @@ -1,7 +1,7 @@ #ifndef MSP_GL_FRAMEFORMAT_H_ #define MSP_GL_FRAMEFORMAT_H_ -#include +#include #include "pixelformat.h" namespace Msp { @@ -11,10 +11,10 @@ namespace GL { Describes a single attachment of a framebuffer. The values are bitfields laid as follows: -nnnn nn__ fsss _ccc - │ │ │ └╴Number of components - │ │ └─────╴Size of one component - │ └────────╴Floating-point flag +nnnn nn_f _sss _ccc + │ │ │ └╴Number of components + │ │ └─────╴Size of one component + │ └──────────╴Floating-point flag └────────────╴Attachment index This information is presented for internal documentation purposes only; it is @@ -23,7 +23,7 @@ inadvisable for programs to rely on it. enum FrameAttachment { COLOR_ATTACHMENT = 0x0014, - DEPTH_ATTACHMENT = 0xF8C1, + DEPTH_ATTACHMENT = 0xF941, STENCIL_ATTACHMENT = 0xFC11 }; @@ -36,9 +36,9 @@ class FrameFormat private: enum { MAX_ATTACHMENTS = 7 }; - UInt8 count; - UInt8 samples; - UInt16 attachments[MAX_ATTACHMENTS]; + std::uint8_t count; + std::uint8_t samples; + std::uint16_t attachments[MAX_ATTACHMENTS]; public: FrameFormat(); @@ -53,8 +53,8 @@ public: unsigned size() const { return count; } bool empty() const { return !count; } - const UInt16 *begin() const { return attachments; } - const UInt16 *end() const { return attachments+count; } + const std::uint16_t *begin() const { return attachments; } + const std::uint16_t *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(UInt16 fa) +inline unsigned get_attach_point(std::uint16_t fa) { return fa>>10; } -PixelFormat get_attachment_pixelformat(UInt16); +PixelFormat get_attachment_pixelformat(std::uint16_t); GLenum get_gl_attachment(FrameAttachment);