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,
std::uint8_t count;
std::uint8_t samples;
- std::uint16_t attachments[MAX_ATTACHMENTS];
+ FrameAttachment attachments[MAX_ATTACHMENTS];
public:
FrameFormat();
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;
};
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);
+GLenum get_gl_buffer_bits(const FrameFormat &);
} // namespace GL
} // namespace Msp