13 #ifndef OGLPLUS_DSA_FRAMEBUFFER_1310090720_HPP
14 #define OGLPLUS_DSA_FRAMEBUFFER_1310090720_HPP
21 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_5 || GL_ARB_direct_state_access
26 typedef tag::Create Type;
35 :
public ObjZeroOps<tag::DirectState, tag::Framebuffer>
75 GLenum result = OGLPLUS_GLFUNC(CheckNamedFramebufferStatus)(
79 if(result == 0) OGLPLUS_CHECK(
80 CheckNamedFramebufferStatus,
109 HandleIncompleteError(status);
131 OGLPLUS_GLFUNC(NamedFramebufferRenderbuffer)(
138 NamedFramebufferRenderbuffer,
140 Subject(renderbuffer).
163 OGLPLUS_GLFUNC(NamedFramebufferRenderbuffer)(
165 GL_COLOR_ATTACHMENT0 + GLuint(attachment_no),
170 NamedFramebufferRenderbuffer,
172 Subject(renderbuffer).
177 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2
197 OGLPLUS_GLFUNC(NamedFramebufferTexture)(
204 NamedFramebufferTexture,
231 OGLPLUS_GLFUNC(NamedFramebufferTexture)(
233 GL_COLOR_ATTACHMENT0 + GLenum(attachment_no),
238 NamedFramebufferTexture,
267 OGLPLUS_GLFUNC(NamedFramebufferTextureLayer)(
275 NamedFramebufferTextureLayer,
299 OGLPLUS_GLFUNC(NamedFramebufferDrawBuffer)(
304 NamedFramebufferDrawBuffer,
315 template <
unsigned N>
318 OGLPLUS_GLFUNC(NamedFramebufferDrawBuffers)(
324 NamedFramebufferDrawBuffers,
337 OGLPLUS_GLFUNC(NamedFramebufferReadBuffer)(_name, GLenum(buffer));
339 NamedFramebufferReadBuffer,
347 typedef ObjectOps<tag::DirectState, tag::Framebuffer>
351 struct DSAFramebufferOpsAndAttch
353 typedef DSAFramebufferOps::Property::Attachment Attachment;
356 Attachment attachment;
364 inline DSAFramebufferOpsAndAttch operator << (
366 DSAFramebufferOps::Property::Attachment attch
369 return DSAFramebufferOpsAndAttch(fbo, attch);
382 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2
385 DSAFramebufferOpsAndAttch&& faa,
396 DSAFramebufferOpsAndAttch&& faa,
410 #endif // GL_ARB_direct_state_access
414 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
415 #include <oglplus/dsa/framebuffer.ipp>
416 #endif // OGLPLUS_LINK_LIBRARY
418 #endif // include guard
OpenGL Color buffer enumeration.
FramebufferStatus
Framebuffer status enumeration.
Definition: framebuffer_status.hpp:24
void ReadBuffer(ColorBuffer buffer)
Sets the source color buffer for read operations.
Definition: framebuffer.hpp:335
void DrawBuffer(ColorBuffer buffer)
Sets the destination color buffer for draw operations.
Definition: framebuffer.hpp:297
void AttachTextureLayer(Property::Attachment attachment, TextureName texture, GLint level, GLint layer)
Attach a texture layer to the attachment point of this FBO.
Definition: framebuffer.hpp:260
Type for the framebuffer color attachment (implementation-dependent) number.
Definition: framebuffer_attachment.hpp:23
void AttachColorRenderbuffer(FramebufferColorAttachmentNumber attachment_no, RenderbufferName renderbuffer)
Attach a renderbuffer to the color attachment_no of this FBO.
Definition: framebuffer.hpp:158
FramebufferAttachment
Framebuffer object attachment points.
Definition: framebuffer_attachment.hpp:56
FramebufferStatus Status
Status of a Framebuffer.
Definition: framebuffer.hpp:53
void Complete(Target target) const
Throws an exception if the framebuffer is not complete.
Definition: framebuffer.hpp:104
void AttachTexture(Property::Attachment attachment, TextureName texture, GLint level)
Attach a texture to the attachment point of this FBO.
Definition: framebuffer.hpp:191
COLOR_BUFFER_BIT: Clear the color buffer.
Implements operations applicable to named (non-zero) objects.
Definition: wrap_tpl.hpp:45
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
OneOf< GLenum, std::tuple< oglplus::ColorBuffer, oglplus::FramebufferColorAttachment > > ColorBuffer
Color buffer specification type.
Definition: framebuffer.hpp:290
Implements operations applicable to any object including object 0 (zero)
Definition: fwd.hpp:157
Framebuffer object wrappers.
void AttachRenderbuffer(Property::Attachment attachment, RenderbufferName renderbuffer)
Attach a renderbuffer to the attachment point of this FBO.
Definition: framebuffer.hpp:126
Stores a value having one of the listed types in a common representation.
Definition: one_of.hpp:60
Exception class for GL object-related errors.
Definition: object.hpp:24
FramebufferTarget
Framebuffer bind target.
Definition: framebuffer_target.hpp:24
Class wrapping framebuffer-related functionality with direct state access.
Definition: framebuffer.hpp:34
void AttachColorTexture(FramebufferColorAttachmentNumber attachment_no, TextureName texture, GLint level)
Attach a texture to the color attachment point of this FBO.
Definition: framebuffer.hpp:225
ObjectOps< tag::DirectState, tag::Framebuffer > DSAFramebufferOps
Framebuffer operations with direct state access.
Definition: framebuffer.hpp:348
bool IsComplete(Target target) const
Returns true if the framebuffer is complete.
Definition: framebuffer.hpp:96
FramebufferStatus Status(Target target) const
Checks the status of the framebuffer.
Definition: framebuffer.hpp:73
OneOf< GLenum, std::tuple< FramebufferAttachment, FramebufferColorAttachment > > Attachment
Attachment of a Framebuffer.
Definition: framebuffer.hpp:50
void DrawBuffers(const EnumArray< ColorBuffer > &buffers)
Sets the destination color buffers for draw operations.
Definition: framebuffer.hpp:316
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136
Object< DSAFramebufferOps > DSAFramebuffer
An oglplus_object encapsulating the OpenGL framebuffer functionality.
Definition: framebuffer.hpp:408
FramebufferColorAttachment
Framebuffer color attachment points.
Definition: framebuffer_attachment.hpp:72