29 lines
753 B
C++
29 lines
753 B
C++
#pragma once
|
|
#include "DeerRender/Render/FrameBuffer.h"
|
|
#include "DeerRender/Resource.h"
|
|
|
|
#include <cstring>
|
|
#include <stdint.h>
|
|
|
|
namespace Deer {
|
|
struct FrameBufferData {
|
|
enum class FrameBufferType : int {
|
|
RGBA8 = 1
|
|
};
|
|
|
|
FrameBufferType frameBufferType;
|
|
int sizeX, sizeY;
|
|
int samples;
|
|
|
|
FrameBufferData(int _sizeX = 100, int _sizeY = 100, int _samples = 4, FrameBufferType type = FrameBufferType::RGBA8)
|
|
: sizeX(_sizeX), sizeY(_sizeY), samples(_samples), frameBufferType(type) { }
|
|
};
|
|
|
|
template <>
|
|
class ResourceBuilder<FrameBuffer> {
|
|
public:
|
|
using BaseDataType = FrameBufferData;
|
|
static Scope<FrameBuffer> buildResource(const BaseDataType& baseData);
|
|
};
|
|
|
|
} |