This commit is contained in:
Asuro
2025-02-25 04:03:48 +01:00
parent d3dcec1458
commit 60f1e72144
17 changed files with 194 additions and 19 deletions

View File

@@ -32,6 +32,7 @@ namespace Game
bgfx::VertexBufferHandle VertexBuffer;
bgfx::IndexBufferHandle IndexBuffer;
bgfx::VertexLayout VertLayout;
uint32_t AssetHandle = UINT16_MAX;
};
struct Material
@@ -54,13 +55,28 @@ namespace Game
bgfx::UniformHandle sampler = BGFX_INVALID_HANDLE);
};
enum class UIVisibilityState
{
None,
Game,
Debug,
};
class GameRendering
{
public:
static constexpr uint32_t MaxModels = 64;
static GameRendering& Get();
public:
UIVisibilityState UIVisible = UIVisibilityState::Game;
private:
bgfx::UniformHandle DefaultSampler;
Texture Textures[8];
Material Materials[8];
Model Models[8];
uint32_t ModelCount = 0;
Model Models[MaxModels];
int32_t LastWidth = 0;
int32_t LastHeight = 0;
uint32_t ResetFlags = BGFX_RESET_VSYNC;
@@ -70,5 +86,6 @@ namespace Game
void Setup();
void Update();
void Shutdown();
uint16_t GetModelHandleFromPath(const char* path);
};
} // namespace Game