1 #ifndef __EASYFBO_HPP__
2 #define __EASYFBO_HPP__
45 #include "al/graphics/al_FBO.hpp"
46 #include "al/graphics/al_Texture.hpp"
52 int internal = GL_RGBA8;
53 unsigned int format = GL_RGBA;
54 unsigned int type = GL_UNSIGNED_BYTE;
57 unsigned int depth_format = GL_DEPTH_COMPONENT24;
60 int wrapS = GL_CLAMP_TO_EDGE;
61 int wrapT = GL_CLAMP_TO_EDGE;
62 int wrapR = GL_CLAMP_TO_EDGE;
65 int filterMin = GL_NEAREST;
66 int filterMag = GL_NEAREST;
68 bool mUseMipmap =
false;
70 bool use_depth_texture =
false;
92 void init(
int width,
int height,
94 int width() {
return mWidth; }
95 int height() {
return mHeight; }
96 FBO &fbo() {
return mFbo; }
98 Texture &depthTex() {
return mDepthTex; }
99 RBO &rbo() {
return mRbo; }
100 void begin() { mFbo.
bind(); }
101 void end() { mFbo.
unbind(); }
102 void bind() { mFbo.
bind(); }
Encapsulates FBO, depth buffer, and texture.
Frame buffer object class.
void bind()
Bind object (start rendering to attached objects)
void unbind()
Unbind object.
Render buffer object class.