X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframeformat.h;h=c55a0f303b269a2d495d29be5cd3354bf4a3e06b;hb=5aeec81a23bc83e90d5daa5eb7b08534c2e238d0;hp=c3f6eae7d510c988c748d4a5f493eb73db59f392;hpb=24b24e2203c776aacd9744bb947f5cf47b03d328;p=libs%2Fgl.git diff --git a/source/core/frameformat.h b/source/core/frameformat.h index c3f6eae7..c55a0f30 100644 --- a/source/core/frameformat.h +++ b/source/core/frameformat.h @@ -8,17 +8,20 @@ namespace Msp { namespace GL { /** -Describes a single attachment of a framebuffer. The values are bitfields laid -as follows: +Describes a single attachment of a framebuffer, including the type and index +of the attachment point and the format of the attached texture. -nnnn nn_f _sss _ccc - │ │ │ └╴Number of components +The values are bitfields laid as follows: + +nnnn nn_f _sss rccc + │ │ │ │ └╴Number of components + │ │ │ └───╴Reverse order flag │ │ └─────╴Size of one component │ └──────────╴Floating-point flag └────────────╴Attachment index This information is presented for internal documentation purposes only; it is -inadvisable for programs to rely on it. +inadvisable for applications to rely on it. */ enum FrameAttachment: std::uint16_t { @@ -36,12 +39,12 @@ class FrameFormat private: enum { MAX_ATTACHMENTS = 7 }; - std::uint8_t count; - std::uint8_t samples; + std::uint8_t count = 0; + std::uint8_t samples = 0; FrameAttachment attachments[MAX_ATTACHMENTS]; public: - FrameFormat(); + FrameFormat() = default; FrameFormat(FrameAttachment); FrameFormat operator,(FrameAttachment) const; @@ -76,10 +79,9 @@ inline unsigned get_attach_point(FrameAttachment fa) PixelFormat get_attachment_pixelformat(FrameAttachment); -unsigned get_gl_attachment(FrameAttachment); -unsigned get_gl_buffer_bits(const FrameFormat &); - } // namespace GL } // namespace Msp +#include "frameformat_backend.h" + #endif