mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
Import SDL3CPlusPlus C++ game engine with: - SDL3 + bgfx rendering backend - Vulkan/Metal/DirectX shader support - MaterialX material system - Scene framework with ECS architecture - Comprehensive test suite (TDD approach) - Conan package management - CMake build system This provides the native C++ foundation for the Universal Platform's Game and 3D capability modules. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
985 B
Lua
43 lines
985 B
Lua
local function identity_matrix()
|
|
return {
|
|
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,
|
|
}
|
|
end
|
|
|
|
function get_scene_objects()
|
|
return {
|
|
{
|
|
vertices = {
|
|
{ position = {0.0, 0.0, 0.0}, color = {1.0, 0.0, 0.0} },
|
|
{ position = {1.0, 0.0, 0.0}, color = {0.0, 1.0, 0.0} },
|
|
{ position = {0.0, 1.0, 0.0}, color = {0.0, 0.0, 1.0} },
|
|
},
|
|
indices = {1, 2, 3},
|
|
compute_model_matrix = function(time)
|
|
return identity_matrix()
|
|
end,
|
|
shader_keys = {"test"},
|
|
},
|
|
}
|
|
end
|
|
|
|
function get_shader_paths()
|
|
return {
|
|
test = {
|
|
vertex = "shaders/test.vert",
|
|
fragment = "shaders/test.frag",
|
|
},
|
|
}
|
|
end
|
|
|
|
function get_view_projection(aspect)
|
|
return identity_matrix()
|
|
end
|
|
|
|
function compute_model_matrix(time)
|
|
return identity_matrix()
|
|
end
|