textures almost work?

This commit is contained in:
Asuro
2025-02-15 04:13:03 +01:00
parent ab326d3624
commit f93c40f3b6
19 changed files with 643 additions and 456 deletions

View File

@@ -2,26 +2,48 @@
#include "bx/math.h"
struct Vec2
{
float x = 0.0f;
float y = 0.0f;
};
struct Vec3
{
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
};
struct Vec4
{
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
float w = 0.0f;
};
struct Mat3
{
// clang-format off
float M[9]{
1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f,
};
// clang-format on
};
struct Mat4
{
// clang-format off
float M[16]{
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0,
};
// clang-format on
};
struct Transform
@@ -54,4 +76,5 @@ namespace Game
void SetShared(SharedData& instance);
GameInstance& GetInstance();
void SetInstance(GameInstance& instance);
void* AllocateScratch(size_t byteCount);
} // namespace Game