X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fframebuffer.h;h=da828bf531f7c70eafc74d297712266fed97fa37;hb=acaefb4c669f01855252818ef0a2958cbdababc3;hp=acb0d3ee918b5fa946549fc12484027fc9a26505;hpb=fc55a95ad69fbaaefde3071712bf36a470970bc0;p=libs%2Fgl.git diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index acb0d3ee..da828bf5 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -2,30 +2,18 @@ #define MSP_GL_FRAMEBUFFER_H_ #include +#include "color.h" #include "frameformat.h" -#include "gl.h" #include "texturecube.h" -#include -#include -#include -#include namespace Msp { namespace GL { -class Texture; class Texture2D; class Texture2DMultisample; class Texture3D; class WindowView; -enum BufferBits -{ - COLOR_BUFFER_BIT = GL_COLOR_BUFFER_BIT, - DEPTH_BUFFER_BIT = GL_DEPTH_BUFFER_BIT, - STENCIL_BUFFER_BIT = GL_STENCIL_BUFFER_BIT -}; - class framebuffer_incomplete: public std::runtime_error { public: @@ -128,8 +116,18 @@ public: static Framebuffer &system(); }; -inline BufferBits operator|(BufferBits a, BufferBits b) -{ return static_cast(static_cast(a)|static_cast(b)); } + +union ClearValue +{ + Color color; + struct + { + float depth; + int stencil; + } depth_stencil; + + ClearValue(): color(0.0f, 0.0f, 0.0f, 0.0f) { } +}; } // namespace GL } // namespace Msp