]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/framebuffer.h
Make it possible to specify explicit clear values
[libs/gl.git] / source / core / framebuffer.h
index acb0d3ee918b5fa946549fc12484027fc9a26505..48888459da363f7b24be4e7edd25aecbc0d00a8f 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_FRAMEBUFFER_H_
 
 #include <vector>
+#include "color.h"
 #include "frameformat.h"
 #include "gl.h"
 #include "texturecube.h"
@@ -128,6 +129,19 @@ public:
        static Framebuffer &system();
 };
 
+
+union ClearValue
+{
+       Color color;
+       struct
+       {
+               float depth;
+               int stencil;
+       } depth_stencil;
+
+       ClearValue(): color(0.0f, 0.0f, 0.0f, 0.0f) { }
+};
+
 inline BufferBits operator|(BufferBits a, BufferBits b)
 { return static_cast<BufferBits>(static_cast<int>(a)|static_cast<int>(b)); }