]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderbuffer.h
Bind ProgramData to a Program upon construction
[libs/gl.git] / source / renderbuffer.h
index b7320929f2f977c98fec344eee7a5ff3ded1bbc8..7f9d7a422a0f5f6378075f2a0ed34622ad06f585 100644 (file)
@@ -1,13 +1,14 @@
 /* $Id$
 
 This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Copyright © 2007, 2009-2011  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
 #ifndef MSP_GL_RENDERBUFFER_H_
 #define MSP_GL_RENDERBUFFER_H_
 
+#include "bindable.h"
 #include "pixelformat.h"
 
 namespace Msp {
@@ -20,7 +21,7 @@ correctly but that is not needed as a texture later.
 
 Requires the GL_EXT_framebuffer_object extension.
 */
-class Renderbuffer
+class Renderbuffer: public Bindable<Renderbuffer>
 {
 private:
        unsigned id;
@@ -35,9 +36,12 @@ public:
        unsigned get_width() const { return width; }
        unsigned get_height() const { return height; }
 
+       void storage(PixelFormat fmt, unsigned width, unsigned height);
+       void storage_multisample(unsigned, PixelFormat fmt, unsigned, unsigned);
+
        void bind() const;
 
-       void storage(PixelFormat fmt, unsigned width, unsigned height);
+       static void unbind();
 };
 
 } // namespace GL