X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frenderbuffer.h;h=b88db17a8a25a6417835290c1caf8fc0273d3712;hb=4d3bee9264c4e60fb811019fc1699e17a338d13d;hp=a9c25ad75b0596a148b73a4420a565128880c918;hpb=a361efc05fcad11b2918f3cd7abdebe794b131d8;p=libs%2Fgl.git diff --git a/source/renderbuffer.h b/source/renderbuffer.h index a9c25ad7..b88db17a 100644 --- a/source/renderbuffer.h +++ b/source/renderbuffer.h @@ -8,8 +8,8 @@ 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 +21,26 @@ correctly but that is not needed as a texture later. Requires the GL_EXT_framebuffer_object extension. */ -class Renderbuffer +class Renderbuffer: public Bindable { 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 bind() const; - void storage(PixelFormat fmt, sizei width, sizei height); + static void unbind(); }; } // namespace GL