Texture Fixes

This commit is contained in:
Isuru Samarathunga
2025-10-17 00:51:28 +05:30
parent ad4a1ac6f2
commit a93910a43d
5 changed files with 147 additions and 144 deletions

View File

@ -42,19 +42,17 @@ namespace ia::iae
BOOL YSortingEnabled{false};
Color ColorOverlay{};
Vec2 TextureOffset{0.0f, 0.0f};
SDL_Rect Scissor{0, 0, 0, 0};
SDL_GPUTexture* ActiveTexture{nullptr};
SDL_GPUViewport ActiveViewport{};
Vec2 SceneScaleFactor{1.0f, 1.0f};
Mat4 ModelMatrix{1.0f};
FLOAT32 PositionY{};
};
SDL_GPURenderPass* ActiveRenderPass{};
SDL_GPUCommandBuffer* ActiveCommandBuffer{};
SDL_GPUColorTargetInfo ColorTargetInfo{};
SDL_GPUDepthStencilTargetInfo DepthStencilTargetInfo{};
class CameraComponent *ActiveCamera{};
struct DrawEntry
{
UINT8 Layer{};
UINT16 SortIndex{};
State DrawState{};
Geometry* GeometryHandle{};
};
public:
@ -72,7 +70,7 @@ namespace ia::iae
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 VOID DrawGeometry(IN Geometry* handle, IN UINT8 layer, IN UINT16 sortIndex);
STATIC SDL_GPUTextureFormat GetRenderTargetFormat();
@ -87,11 +85,18 @@ namespace ia::iae
STATIC INT32 s_screenHeight;
STATIC SDL_GPUDevice *s_gpuDevice;
STATIC SDL_GPUTexture *s_renderTargetSceneColor;
STATIC SDL_GPUTexture *s_renderTargetSceneDepth;
STATIC SDL_GPUTexture *s_renderTargetDebugDrawColor;
STATIC Pipeline* s_geometryPipeline;
STATIC Pipeline* s_postprocessPipeline;
STATIC Geometry* s_quadGeometry;
STATIC Vector<DrawEntry> s_drawEntries;
STATIC SDL_GPURenderPass* s_activeRenderPass;
STATIC SDL_GPUCommandBuffer* s_activeCommandBuffer;
STATIC SDL_GPUColorTargetInfo s_colorTargetInfo;
STATIC class CameraComponent *s_activeCamera;
STATIC SDL_Rect s_scissor;
STATIC SDL_GPUViewport s_activeViewport;
STATIC Vec2 s_sceneScaleFactor;
friend class Engine;
};