#include
<oglplus/framebuffer.hpp>
template <> class ObjCommonOps<tag::Framebuffer> : public FramebufferName { public: typedef FramebufferTarget Target; static FramebufferName Binding(FramebufferTarget target); static void Bind(FramebufferTarget target, FramebufferName framebuffer); void Bind(FramebufferTarget target) const; };
Framebuffer bind target. |
|
Returns the framebuffer currently bound to the specified |
|
Binds the specified |
|
Binds |
template <> class ObjectOps<tag::ExplicitSel, tag::Framebuffer> : public ObjZeroOps<tag::ExplicitSel, tag::Framebuffer> { public: struct Property { typedef OneOf< FramebufferBuffer, FramebufferAttachment, FramebufferColorAttachment > Buffer; typedef OneOf< FramebufferAttachment, FramebufferColorAttachment > Attachment; typedef FramebufferStatus Status; }; static FramebufferStatus Status(FramebufferTarget target); static bool IsComplete(FramebufferTarget target); static void Complete(FramebufferTarget target); static void AttachRenderbuffer( FramebufferTarget target, Property::Attachment attachment, RenderbufferName renderbuffer ); static void AttachColorRenderbuffer( FramebufferTarget target, FramebufferColorAttachmentNumber attachment_no, RenderbufferName renderbuffer ); #if GL_VERSION_3_2 static void AttachTexture( FramebufferTarget target, Property::Attachment attachment, TextureName texture, GLint level ); static void AttachColorTexture( FramebufferTarget target, FramebufferColorAttachmentNumber attachment_no, TextureName texture, GLint level ); #endif static void AttachTexture1D( FramebufferTarget target, Property::Attachment attachment, TextureTarget textarget, TextureName texture, GLint level ); static void AttachTexture2D( FramebufferTarget target, Property::Attachment attachment, TextureTarget textarget, TextureName texture, GLint level ); static void AttachTexture3D( FramebufferTarget target, Property::Attachment attachment, TextureTarget textarget, TextureName texture, GLint level, GLint layer ); static void AttachTextureLayer( FramebufferTarget target, Property::Attachment attachment, TextureName texture, GLint level, GLint layer );
Indirectly inherits from ObjCommonOps<tag::Framebuffer>. |
|
Enumerations specifying framebuffer output buffer. |
|
Enumerations specifying framebuffer attachments. |
|
Returns the status of the framebuffer currently bound to the specified
|
|
Returns true if the framebuffer currently bound to the specified |
|
Throws an IncompleteFramebuffer
exception if the framebuffer currently bound to the specified |
|
Attaches a |
|
Attaches a |
|
Attaches the specified |
|
Attaches the specified |
|
Attaches the |
|
Attaches the |
#if GL_VERSION_4_3 || GL_ARB_invalidate_subdata static void Invalidate( FramebufferTarget target, const EnumArray<Property::Buffer>& buffers ); static void Invalidate( FramebufferTarget target, SizeType count, const Property::Buffer* buffers ); static void Invalidate( FramebufferTarget target, const EnumArray<Property::Buffer>& buffers, GLint x, GLint y, SizeType width, SizeType height ); static void Invalidate( FramebufferTarget target, SizeType count, const Property::Buffer* buffers, GLint x, GLint y, SizeType width, SizeType height ); #endif };
Invalidates the specified attachments or |
|
Invalidates parts (specified by |
typedef ObjectOps<tag::ExplicitSel, tag::Framebuffer> FramebufferOps; typedef Object<FramebufferOps> Framebuffer; typedef ObjectZero<ObjZeroOps<tag::ExplicitSel, tag::Framebuffer>> DefaultFramebuffer;
struct FramebufferComplete { }; struct FramebufferTargetAndAttch { }; FramebufferTargetAndAttch operator | ( FramebufferTarget target, FramebufferOps::Property::Attachment attachment ); FramebufferTargetAndAttch operator << ( FramebufferTarget target, FramebufferOps::Property::Attachment attachment ); FramebufferTarget operator << ( FramebufferOps fbo, FramebufferTarget target ); FramebufferTarget operator << ( DefaultFramebuffer dfb, FramebufferTarget target ); #if GL_VERSION_3_2 FramebufferTarget operator << ( FramebufferTargetAndAttch taa, TextureName tex ); #endif // AttachRenderbuffer FramebufferTarget operator << ( FramebufferTargetAndAttch taa, RenderbufferName rbo ); FramebufferTarget operator << ( FramebufferTarget target, FramebufferComplete );
Helper class used with syntax-sugar operators. Selects the Complete member function. |
|
Helper class used with syntax-sugar operators. Stores a framebuffer target and attachment. |
|
These two operators both tie a framebuffer target and attachment into a single object for use with subsequent operators. |
|
Equivalent to |
|
Attaches |
|
Attaches |
|
Equivalent to |
#include
<oglplus/framebuffer_target.hpp>
enum class FramebufferTarget : GLenum { Draw = GL_DRAW_FRAMEBUFFER, Read = GL_READ_FRAMEBUFFER, Both = GL_FRAMEBUFFER }; template <> Range<FramebufferTarget> EnumValueRange<FramebufferTarget>(void); StrCRef EnumValueName(FramebufferTarget);
#if !OGLPLUS_NO_ENUM_VALUE_CLASSES
namespace enums {
template <typename Base, template<FramebufferTarget> class Transform>
class EnumToClass<Base, FramebufferTarget, Transform>
: public Base
{
public:
EnumToClass(void);
EnumToClass(Base&& base);
Transform<FramebufferTarget::Draw>
Draw;
Transform<FramebufferTarget::Read>
Read;
Transform<FramebufferTarget::Both>
Both;
};
} // namespace enums
#endif
Specialization of EnumToClass for the FramebufferTarget enumeration. |
#include
<oglplus/framebuffer_attachment.hpp>
enum class FramebufferBuffer : GLenum { Color = GL_COLOR, Depth = GL_DEPTH, Stencil = GL_STENCIL, DepthStencil = GL_DEPTH_STENCIL }; template <> Range<FramebufferBuffer> EnumValueRange<FramebufferBuffer>(void); StrCRef EnumValueName(FramebufferBuffer);
#include
<oglplus/framebuffer_attachment.hpp>
enum class FramebufferAttachment : GLenum { Color = GL_COLOR_ATTACHMENT0, Color1 = GL_COLOR_ATTACHMENT1, Color2 = GL_COLOR_ATTACHMENT2, Color3 = GL_COLOR_ATTACHMENT3, Color4 = GL_COLOR_ATTACHMENT4, Color5 = GL_COLOR_ATTACHMENT5, Color6 = GL_COLOR_ATTACHMENT6, Color7 = GL_COLOR_ATTACHMENT7, Color8 = GL_COLOR_ATTACHMENT8, Color9 = GL_COLOR_ATTACHMENT9, Color10 = GL_COLOR_ATTACHMENT10, Color11 = GL_COLOR_ATTACHMENT11, Color12 = GL_COLOR_ATTACHMENT12, Color13 = GL_COLOR_ATTACHMENT13, Color14 = GL_COLOR_ATTACHMENT14, Color15 = GL_COLOR_ATTACHMENT15, Depth = GL_DEPTH_ATTACHMENT, Stencil = GL_STENCIL_ATTACHMENT, DepthStencil = GL_DEPTH_STENCIL_ATTACHMENT }; template <> Range<FramebufferAttachment> EnumValueRange<FramebufferAttachment>(void); StrCRef EnumValueName(FramebufferAttachment);
#include
<oglplus/framebuffer_attachment.hpp>
enum class FramebufferColorAttachment : GLenum { _0 = GL_COLOR_ATTACHMENT0, _1 = GL_COLOR_ATTACHMENT1, _2 = GL_COLOR_ATTACHMENT2, _3 = GL_COLOR_ATTACHMENT3, _4 = GL_COLOR_ATTACHMENT4, _5 = GL_COLOR_ATTACHMENT5, _6 = GL_COLOR_ATTACHMENT6, _7 = GL_COLOR_ATTACHMENT7, _8 = GL_COLOR_ATTACHMENT8, _9 = GL_COLOR_ATTACHMENT9, _10 = GL_COLOR_ATTACHMENT10, _11 = GL_COLOR_ATTACHMENT11, _12 = GL_COLOR_ATTACHMENT12, _13 = GL_COLOR_ATTACHMENT13, _14 = GL_COLOR_ATTACHMENT14, _15 = GL_COLOR_ATTACHMENT15 }; template <> Range<FramebufferColorAttachment> EnumValueRange<FramebufferColorAttachment>(void); StrCRef EnumValueName(FramebufferColorAttachment);
#include
<oglplus/framebuffer_attachment.hpp>
class FramebufferColorAttachmentNumber : public LimitedCount<GL_MAX_COLOR_ATTACHMENTS> { public: FramebufferColorAttachmentNumber(GLuint number); };
Throws LimitError
if |
#include
<oglplus/framebuffer_status.hpp>
enum class FramebufferStatus : GLenum { Complete = GL_FRAMEBUFFER_COMPLETE, Undefined = GL_FRAMEBUFFER_UNDEFINED, IncompleteAttachment = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, IncompleteMissingAttachment = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT, Unsupported = GL_FRAMEBUFFER_UNSUPPORTED, IncompleteMultisample = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, IncompleteLayerTargets = GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS }; template <> Range<FramebufferStatus> EnumValueRange<FramebufferStatus>(void); StrCRef EnumValueName(FramebufferStatus);