26 lines
428 B
C++
26 lines
428 B
C++
#ifndef FRAMEBUFFER_H
|
|
#define FRAMEBUFFER_H
|
|
|
|
#include <glew/glew.h>
|
|
#include <vector>
|
|
|
|
class Texture;
|
|
|
|
class FrameBuffer
|
|
{
|
|
protected:
|
|
GLuint fbo;
|
|
std::vector<Texture*> textures;
|
|
std::vector<GLuint> attachments;
|
|
public:
|
|
FrameBuffer();
|
|
~FrameBuffer();
|
|
void addTexture(Texture* tex, GLenum attachment);
|
|
void initGL();
|
|
|
|
void bindFBO();
|
|
Texture* getTexture(int texId);
|
|
};
|
|
|
|
#endif // FRAMEBUFFER_H
|