Master Graphics Reclaim Control
The c++ framework for high-performance graphics with precision and simplicity
Get started#include "dengine/core.h"
int main() {
de::DE App;
App.config.title = "DEngine App";
App.config.width = 800;
App.config.height = 600;
de::logSDL2renderersInfo();
de::core::Init(App);
de::core::Run(App);
de::core::Clean(App);
return 0;
}
ECS
Entity component systems from the ground up for high performance runtime
#include "dengine/ecs/ecs.hpp"
int main {
auto logger = getMultiSinkLogger();
struct TransformComponent {
float position{1.0f};
float rotation{2.0f};
};
struct TagIdComponent {
int id{2};
};
logger.info("TransformComponent ID: {}",
de::ecs::GetId<TransformComponent>());
logger.info("TagId ID: {}", de::ecs::GetId<TagIdComponent>());
de::ecs::Scene scene;
de::ecs::EntityID newEnt = scene.NewEntity();
scene.Assign<TransformComponent>(newEnt);
auto t = scene.Get<TransformComponent>(newEnt);
logger.info("TransformComponent position of newEnt: {}", scene.Get<TransformComponent>(newEnt)->position);
t->position = 3.0f;
logger.info("New TransformComponent position of newEnt: {}", scene.Get<TransformComponent>(newEnt)->position);
return 0;
}