33#ifndef GL_FRAME_BUFFER_H
34#define GL_FRAME_BUFFER_H
42 class DVDTextureTarget;
50 class GLAPIRenderTarget;
51 class CEGUIRenderTarget;
138 rt.
begin(drawPolicy, clearPolicy);
156 rt.
clear(clearPolicy);
static void clear(glFramebuffer &rt, const RTClearDescriptor &clearPolicy)
static void end(glFramebuffer &rt, const RTTransitionMask &mask)
static void begin(glFramebuffer &rt, const RTDrawDescriptor &drawPolicy, const RTClearDescriptor &clearPolicy)
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
OpenGL implementation of the RenderAPIWrapper.
GFXDevice & context() const noexcept
bool initAttachment(RTAttachment *att, RTAttachmentType type, RTColourAttachmentSlot slot) override
RTDrawDescriptor _previousPolicy
void blitFrom(RenderTarget *source, const RTBlitParams ¶ms)
void begin(const RTDrawDescriptor &drawPolicy, const RTClearDescriptor &clearPolicy)
eastl::fixed_vector< BindingState, 8+2, true > _attachmentState
~glFramebuffer() override
gl46core::GLuint _framebufferResolveHandle
bool setMipLevelInternal(U8 attachmentIdx, U16 writeLevel)
void end(const RTTransitionMask &mask)
void prepareBuffers(const RTDrawDescriptor &drawPolicy)
PROPERTY_R_IW(Str< 128 >, debugMessage, "")
gl46core::GLenum _activeReadBuffer
bool create() override
Bake in all settings and attachments to Prepare it for rendering.
void clear(const RTClearDescriptor &descriptor)
static void QueueMipMapsRecomputation(const RTAttachment_uptr &attachment)
void setMipLevel(U16 writeLevel)
bool toggleAttachment(U8 attachmentIdx, AttachmentState state, U16 levelOffset, DrawLayerEntry layerOffset, bool layeredRendering)
std::array< DrawLayerEntry, RT_MAX_ATTACHMENT_COUNT > _previousDrawLayers
struct Divide::glFramebuffer::ColourBufferState _colourBuffers
void resolve(const RTTransitionMask &mask)
bool checkStatusInternal(gl46core::GLuint handle)
PROPERTY_R_IW(gl46core::GLuint, framebufferHandle, GL_NULL_HANDLE)
Handle console commands that start with a forward slash.
eastl::fixed_vector< RTBlitEntry, MAX_BLIT_ENTRIES, false > RTBlitParams
RTAttachmentType
This enum is used when creating render targets to define the channel that the texture will attach to.
constexpr gl46core::GLuint GL_NULL_HANDLE
Invalid object value. Used to compare handles and determine if they were properly created.
std::array< RTClearEntry, RT_MAX_ATTACHMENT_COUNT > RTClearDescriptor
bool[RT_MAX_ATTACHMENT_COUNT] RTTransitionMask
constexpr auto to_base(const Type value) -> Type
bool operator==(const BindingState &) const =default
AttachmentState _attState
std::array< gl46core::GLenum, to_base(RTColourAttachmentSlot::COUNT)> _glSlot