tmp
This commit is contained in:
parent
9e339defd6
commit
a9fbb909ac
21 changed files with 322 additions and 30 deletions
34
RasterRender/public/FrameBuffer.hpp
Normal file
34
RasterRender/public/FrameBuffer.hpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "Rect.hpp"
|
||||
#include "Color.hpp"
|
||||
|
||||
namespace tp {
|
||||
class RenderBuffer {
|
||||
public:
|
||||
RenderBuffer(const Vec2F& size);
|
||||
RenderBuffer(const Vec2F& size, tp::uint1 samples);
|
||||
~RenderBuffer();
|
||||
|
||||
void beginDraw();
|
||||
void setViewport(const RectF& viewport);
|
||||
void clear();
|
||||
void endDraw();
|
||||
|
||||
uint4 texId() const;
|
||||
uint4 buffId() const;
|
||||
|
||||
const Vec2F& getSize() const;
|
||||
|
||||
public:
|
||||
RGBA mClearCol = 0.f;
|
||||
|
||||
private:
|
||||
uint4 mFrameBufferID = 0; // regroups 0, 1, or more textures, and 0 or 1 depth buffer.
|
||||
uint4 mTextureId = 0; // texture we're going to render to ( colour attachement #0 )
|
||||
uint4 mDepthBufferID = 0;
|
||||
uint4 mDrawBuffers[1];
|
||||
Vec2F mSize;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue