You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef FRAMEBUFFER_H
|
|
|
|
#define FRAMEBUFFER_H
|
|
|
|
|
|
|
|
#include "graphicsdeclarations.h"
|
|
|
|
|
|
|
|
class FrameBuffer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
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();
|
|
|
|
|
|
|
|
/// Draw framebuffer
|
|
|
|
void draw(int x, int y, int width, int height);
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint m_fboTexture;
|
|
|
|
uint m_fbo;
|
|
|
|
bool m_fallbackOldImp;
|
|
|
|
int m_width;
|
|
|
|
int m_height;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|