X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Frenderbuffer.h;fp=source%2Frenderbuffer.h;h=a9c25ad75b0596a148b73a4420a565128880c918;hb=a361efc05fcad11b2918f3cd7abdebe794b131d8;hp=0000000000000000000000000000000000000000;hpb=85e83ace47e5a9a8ae7263886255dd81afc69278;p=libs%2Fgl.git diff --git a/source/renderbuffer.h b/source/renderbuffer.h new file mode 100644 index 00000000..a9c25ad7 --- /dev/null +++ b/source/renderbuffer.h @@ -0,0 +1,43 @@ +/* $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 "pixelformat.h" +#include "types.h" + +namespace Msp { +namespace GL { + +/** +A Renderbuffer contains a single renderable image. It can be attached to a +Framebuffer to provide a logical buffer that is required to render the scene +correctly but that is not needed as a texture later. + +Requires the GL_EXT_framebuffer_object extension. +*/ +class Renderbuffer +{ +private: + uint id; + +public: + Renderbuffer(); + ~Renderbuffer(); + + uint get_id() const { return id; } + + void bind() const; + + void storage(PixelFormat fmt, sizei width, sizei height); +}; + +} // namespace GL +} // namespace Msp + +#endif