]> git.tdb.fi Git - libs/gl.git/blob - source/renderbuffer.h
Use DevIL for loading images
[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 #include "types.h"
13
14 namespace Msp {
15 namespace GL {
16
17 /**
18 A Renderbuffer contains a single renderable image.  It can be attached to a
19 Framebuffer to provide a logical buffer that is required to render the scene
20 correctly but that is not needed as a texture later.
21
22 Requires the GL_EXT_framebuffer_object extension.
23 */
24 class Renderbuffer
25 {
26 private:
27         uint id;
28
29 public:
30         Renderbuffer();
31         ~Renderbuffer();
32
33         uint get_id() const { return id; }
34
35         void bind() const;
36
37         void storage(PixelFormat fmt, sizei width, sizei height);
38 };
39
40 } // namespace GL
41 } // namespace Msp
42
43 #endif