$ dengine gallery
See it work
The interactive piece from the front page, with room to try it, followed by DEngine’s logo, colors and type.
Declare the assets, load them in one call, record the frame.
Sky Hop is a small playable arcade game in the repository, built only on the engine’s own window, GPU, asset, shader and input APIs.
[assets]
"shaders/sky_hop" = { type = "shader", source = "shaders/sky_hop.slang" }
[bundles.hello]
assets = ["shaders/*"]examples/flappy_bird/assets.toml, the whole file. Assets and bundles are declared, not loaded by hand.
const de_asset_id ids[1] = {de_asset_id_from("shaders/sky_hop")};
a->load = de_asset_load_many(a->assets, ids, 1, 0);
if (de_asset_wait(a->assets, a->load, WAIT_NS) != DE_LOAD_READY) {
char msg[512] = "?";
for (u32 i = 0; i < 1; ++i)
if (de_asset_last_error(a->assets, ids[i], msg, sizeof msg) == DE_OK)
fprintf(stderr, "sky_hop: asset %u: %s\n", i, msg);
fprintf(stderr, "sky_hop: the assets did not load\n");
return 1;
}
return 0;
}main.c, lines 145–156. One call starts a load, one waits on it, and a failure says why.
static void record_scene(app *a, de_gpu_cmd *c, de_gpu_texture target) {
u32 slot = (u32)(a->frame % FRAMES_IN_FLIGHT);
a->drawing = a->maps[slot];
a->count = 0;
scene(a);
de_gpu_barrier b = {
.buffer = a->rectangles[slot], .before = DE_ACCESS_NONE, .after = DE_ACCESS_SHADER_READ};
de_gpu_cmd_barriers(c, &b, 1);
de_gpu_attachment color = {
.texture = target, .clear = true, .clear_color = {.017f, .05f, .055f, 1}, .store = true};
de_gpu_cmd_begin_render(c, &color, 1, NULL);
de_gpu_cmd_set_pipeline(c, a->pipe);
struct {
u32 rectangles;
f32 width, height;
u32 pad;
} pc = {de_gpu_buffer_bindless(a->d, a->rectangles[slot]), (f32)a->width, (f32)a->height, 0};
de_gpu_cmd_push_constants(c, &pc, sizeof pc);
de_gpu_cmd_draw(c, 6, a->count, 0, 0);
de_gpu_cmd_end_render(c);
}main.c, lines 310–330. The frame is recorded straight onto the GPU abstraction: one barrier, one pipeline, one instanced draw.
Assets
Logo, colors, and type.
Mark
The project’s generated logo mark. The grid gets finer with the commit count, and the cells show the split between languages. It’s redrawn as the project grows.
Palette
The colors DEngine uses across this site: one hue from its discipline’s band, plus the shades that make it work on both dark and light backgrounds.
Type
The two typefaces on the site: a sans-serif for the interface and a serif for headlines.
Next
Put DEngine in your pipeline
Ask about hooking it up to the repositories and agents you already run.