34 lines
518 B
C++
34 lines
518 B
C++
#ifndef RENDERTARGET_H
|
|
#define RENDERTARGET_H
|
|
|
|
#include <stdlib.h>
|
|
#include "utils/maths.h"
|
|
|
|
class Texture2D;
|
|
class RenderDevice;
|
|
|
|
class RenderTarget
|
|
{
|
|
friend class RenderDevice;
|
|
public:
|
|
// #TODO: Little hack
|
|
static void setDefaultFramebuffer();
|
|
|
|
public:
|
|
RenderTarget();
|
|
~RenderTarget();
|
|
|
|
void Create(const char* name = NULL);
|
|
void Destroy();
|
|
|
|
void Finialize();
|
|
|
|
void AttachColorTexture(int slot, Texture2D* texture);
|
|
void AttachDepthTexture(Texture2D* texture);
|
|
|
|
private:
|
|
uint m_framebuffer;
|
|
|
|
};
|
|
|
|
#endif |