22 #ifndef BACKENDS_GRAPHICS_OPENGL_FRAMEBUFFER_H 23 #define BACKENDS_GRAPHICS_OPENGL_FRAMEBUFFER_H 25 #include "graphics/opengl/system_headers.h" 27 #include "math/matrix4.h" 85 void setClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
108 kCopyMaskClearColor = (1 << 0),
109 kCopyMaskBlendState = (1 << 1),
110 kCopyMaskScissorState = (1 << 2),
111 kCopyMaskScissorBox = (1 << 4),
113 kCopyMaskAll = kCopyMaskClearColor | kCopyMaskBlendState |
114 kCopyMaskScissorState | kCopyMaskScissorBox,
123 bool isActive()
const {
return _pipeline !=
nullptr; }
126 void applyViewport();
128 Math::Matrix4 _projectionMatrix;
129 void applyProjectionMatrix();
150 virtual bool setSize(uint width, uint height) = 0;
165 GLfloat _clearColor[4];
166 void applyClearColor();
169 void applyBlendState();
171 bool _scissorTestState;
172 void applyScissorTestState();
174 GLint _scissorBox[4];
175 void applyScissorBox();
186 bool setSize(uint width, uint height)
override;
219 bool setSize(uint width, uint height)
override;
Definition: framebuffer.h:181
virtual bool setSize(uint width, uint height)=0
void setClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
Definition: framebuffer.h:36
void setScissorBox(GLint x, GLint y, GLsizei w, GLsizei h)
void copyRenderStateFrom(const Framebuffer &other, uint copyMask)
Definition: framebuffer.h:79
Definition: framebuffer.h:53
GLTexture * getTexture() const
Definition: framebuffer.h:224
virtual void deactivateInternal()
Definition: framebuffer.h:144
BlendMode
Definition: framebuffer.h:42
const Math::Matrix4 & getProjectionMatrix() const
Definition: framebuffer.h:105
Definition: framebuffer.h:201
void enableScissorTest(bool enable)
void enableBlend(BlendMode mode)
Definition: framebuffer.h:47
void activate(Pipeline *pipeline)
Definition: renderbuffer.h:27
Definition: framebuffer.h:59
Definition: framebuffer.h:68
virtual void activateInternal()=0
Definition: framebuffer.h:73
Definition: pipeline.h:42