Renderer
This commit is contained in:
@ -24,7 +24,7 @@ namespace ia::iae
|
||||
class Renderer
|
||||
{
|
||||
public:
|
||||
struct Mesh
|
||||
struct Geometry
|
||||
{
|
||||
INT32 IndexCount{};
|
||||
SDL_GPUBuffer *IndexBuffer;
|
||||
@ -36,11 +36,11 @@ namespace ia::iae
|
||||
BOOL FlippedH{false};
|
||||
BOOL FlippedV{false};
|
||||
BOOL CameraRelative{true};
|
||||
BOOL ScissorEnabled{false};
|
||||
BOOL YSortingEnabled{false};
|
||||
Color ColorOverlay{};
|
||||
Vec2 TextureOffset{0.0f, 0.0f};
|
||||
SDL_Rect Scissor{0, 0, 0, 0};
|
||||
Handle ActiveTexture{INVALID_HANDLE};
|
||||
SDL_GPUTexture* ActiveTexture{nullptr};
|
||||
|
||||
Mat4 ModelMatrix{1.0f};
|
||||
Mat4 ProjectionMatrix{1.0f};
|
||||
@ -63,6 +63,11 @@ namespace ia::iae
|
||||
STATIC VOID OnScreenResize(IN INT32 newWidth, IN INT32 newHeight);
|
||||
|
||||
public:
|
||||
STATIC Geometry* CreateGeometry(IN CONST Vector<GeometryVertex> &vertices, IN CONST Vector<INT32> &indices);
|
||||
STATIC VOID DestroyGeometry(IN Geometry* handle);
|
||||
|
||||
STATIC VOID DrawGeometry(IN Geometry* handle);
|
||||
|
||||
STATIC SDL_GPUTextureFormat GetRenderTargetFormat();
|
||||
|
||||
STATIC SDL_GPUDevice *GetDevice()
|
||||
@ -80,6 +85,7 @@ namespace ia::iae
|
||||
STATIC SDL_GPUTexture *s_renderTargetDebugDrawColor;
|
||||
STATIC Pipeline* s_geometryPipeline;
|
||||
STATIC Pipeline* s_postprocessPipeline;
|
||||
STATIC Geometry* s_quadGeometry;
|
||||
|
||||
friend class Engine;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user