]> git.tdb.fi Git - libs/gl.git/blob - source/renderbuffer.h
Get rid of the typedefs for fundamental types
[libs/gl.git] / source / renderbuffer.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_RENDERBUFFER_H_
9 #define MSP_GL_RENDERBUFFER_H_
10
11 #include "pixelformat.h"
12
13 namespace Msp {
14 namespace GL {
15
16 /**
17 A Renderbuffer contains a single renderable image.  It can be attached to a
18 Framebuffer to provide a logical buffer that is required to render the scene
19 correctly but that is not needed as a texture later.
20
21 Requires the GL_EXT_framebuffer_object extension.
22 */
23 class Renderbuffer
24 {
25 private:
26         unsigned id;
27         unsigned width;
28         unsigned height;
29
30 public:
31         Renderbuffer();
32         ~Renderbuffer();
33
34         unsigned get_id() const { return id; }
35         unsigned get_width() const { return width; }
36         unsigned get_height() const { return height; }
37
38         void bind() const;
39
40         void storage(PixelFormat fmt, unsigned width, unsigned height);
41 };
42
43 } // namespace GL
44 } // namespace Msp
45
46 #endif