Warning
This library is still early in development and subject to change frequently. Use at your own risk!
CGE (aka Siege): A simple C++ Game Engine.
This project is a successor to my Rust Game Engine.
Supports Windows, Linux, and MacOS, compiled with Clang + CMake.
void Game::render(cge::Engine& engine, cge::Scene& scene)
{
scene.backcolor = 0xFF000040;
scene.draw_tri(
std::array
{
cge::Vertex { .xyzw = { -1.0f, -1.0f }, .st = { 0xFFFF0000 } },
cge::Vertex { .xyzw = { 0.5f, 0.0f }, .st = { 0x00FF0000 } },
cge::Vertex { .xyzw = { -1.0f, 1.0f }, .st = { 0xFFFF0000 } },
}
);
scene.draw_tri(
std::array
{
cge::Vertex { .xyzw = { 1.0f, -1.0f }, .st = { 0xFF00FF00 } },
cge::Vertex { .xyzw = { -0.5f, 0.0f }, .st = { 0x0000FF00 } },
cge::Vertex { .xyzw = { 1.0f, 1.0f }, .st = { 0xFF00FF00 } },
}
);
}