SparrowRenderer/framebuffer.h
2015-12-07 07:18:57 +01:00

27 lines
484 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(bool isNULL = false);
~FrameBuffer();
void addTexture(Texture* tex, GLenum attachment);
void initGL();
void bindFBO();
Texture* getTexture(int texId);
static FrameBuffer* getScreen();
};
#endif // FRAMEBUFFER_H