sgltk 0.6
Simple OpenGL Tool Kit
Loading...
Searching...
No Matches
renderbuffer.h
1#ifndef __RENDERBUFFER_H__
2#define __RENDERBUFFER_H__
3
4#include "app.h"
5
6namespace sgltk {
7
12class Renderbuffer {
13 GLenum format;
14 public:
18 unsigned int width;
22 unsigned int height;
26 GLuint buffer;
27
28 EXPORT Renderbuffer();
34 EXPORT Renderbuffer(unsigned int height,
35 unsigned int width,
36 GLenum format);
37 EXPORT ~Renderbuffer();
41 EXPORT void bind();
45 EXPORT void unbind();
50 EXPORT void set_format(GLenum format);
56 EXPORT void set_size(unsigned int width, unsigned int height);
57};
58
59}
60
61#endif
void set_size(unsigned int width, unsigned int height)
Sets the width and height of the renderbuffer.
GLuint buffer
The renderbuffer name.
void bind()
Binds the renderbuffer.
void set_format(GLenum format)
Sets the format of the renderbuffer.
void unbind()
Unbinds the renderbuffer.
unsigned int width
The width of the buffer.
unsigned int height
The height of the buffer.