2010-11-23 16:30:43 +01:00
|
|
|
#ifndef FRAMEBUFFER_H
|
|
|
|
#define FRAMEBUFFER_H
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
#include "graphicsdeclarations.h"
|
2011-08-12 03:38:54 +02:00
|
|
|
|
2010-11-23 16:30:43 +01:00
|
|
|
class FrameBuffer
|
|
|
|
{
|
2010-11-23 22:56:28 +01:00
|
|
|
public:
|
2010-11-23 16:30:43 +01:00
|
|
|
FrameBuffer(int width, int height);
|
|
|
|
virtual ~FrameBuffer();
|
|
|
|
|
|
|
|
/// Bind the framebuffer, everything rendered will be draw on it
|
|
|
|
void bind();
|
|
|
|
|
|
|
|
/// Unbind the framebuffer, render on back buffer again
|
|
|
|
void unbind();
|
|
|
|
|
2010-11-23 22:56:28 +01:00
|
|
|
/// Draw framebuffer
|
|
|
|
void draw(int x, int y, int width, int height);
|
|
|
|
|
2010-11-23 16:30:43 +01:00
|
|
|
private:
|
2011-04-06 22:18:00 +02:00
|
|
|
uint m_fboTexture;
|
|
|
|
uint m_fbo;
|
2010-11-23 16:30:43 +01:00
|
|
|
bool m_fallbackOldImp;
|
|
|
|
int m_width;
|
|
|
|
int m_height;
|
|
|
|
};
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
#endif
|