]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/framebuffer.h
Completely hide OpenGL from the public headers
[libs/gl.git] / source / core / framebuffer.h
index acb0d3ee918b5fa946549fc12484027fc9a26505..89407e8ba69b270bcc4f707eed89dc81a6b52028 100644 (file)
@@ -2,13 +2,9 @@
 #define MSP_GL_FRAMEBUFFER_H_
 
 #include <vector>
+#include "color.h"
 #include "frameformat.h"
-#include "gl.h"
 #include "texturecube.h"
-#include <msp/gl/extensions/arb_geometry_shader4.h>
-#include <msp/gl/extensions/ext_framebuffer_multisample.h>
-#include <msp/gl/extensions/ext_framebuffer_object.h>
-#include <msp/gl/extensions/nv_fbo_color_attachments.h>
 
 namespace Msp {
 namespace GL {
@@ -19,13 +15,6 @@ 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 +117,18 @@ public:
        static Framebuffer &system();
 };
 
-inline BufferBits operator|(BufferBits a, BufferBits b)
-{ return static_cast<BufferBits>(static_cast<int>(a)|static_cast<int>(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