00001 #pragma once
00002
00003 #include "Vis.hpp"
00004 #include "VisTexture2D.hpp"
00005 #include <vector>
00006
00010 class FBO
00011 {
00015 static vector<FBO*> fboStack;
00016
00020 V2i size;
00021
00025 GLuint framebuffer;
00026
00030 Texture2D* texture;
00031
00035 GLuint depthBuffer;
00036
00040 GLuint stencilBuffer;
00041
00045 bool usingOwnDepthBuffer;
00046
00050 bool usingOwnStencilBuffer;
00051
00052 public:
00053
00058 FBO(Texture2D* texture,
00059 GLint depthBuffer=-1,
00060 GLint stencilBuffer=-1);
00061
00062 virtual ~FBO();
00063
00067 GLuint getDepthBuffer();
00068
00072 GLuint getStencilBuffer();
00073
00078 void unbind();
00079
00083 void bind();
00084
00085 };