]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderbuffer.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / renderbuffer.h
index a9c25ad75b0596a148b73a4420a565128880c918..977f2453af950df7600e6823448eae6fdd6c0d59 100644 (file)
@@ -1,15 +1,8 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_RENDERBUFFER_H_
 #define MSP_GL_RENDERBUFFER_H_
 
+#include "bindable.h"
 #include "pixelformat.h"
-#include "types.h"
 
 namespace Msp {
 namespace GL {
@@ -21,20 +14,27 @@ 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:
-       uint id;
+       unsigned id;
+       unsigned width;
+       unsigned height;
 
 public:
        Renderbuffer();
        ~Renderbuffer();
 
-       uint get_id() const { return id; }
+       unsigned get_id() const { return id; }
+       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, sizei width, sizei height);
+       static void unbind();
 };
 
 } // namespace GL