KKE is a Windows 2D rendering engine built around a Direct2D / DirectWrite / WIC backend. The current implementation centers on kke::D2dEngine and supports shapes, text, textures, layers, offscreen canvases, and effects through one API surface.
engine().draw(
mountainTexture(),
{{180.0f, 90.0f}, {1100.0f, 650.0f}},
{0.95f, kke::TextureInterpolation::Linear}
);
kke::RoundedRect blurRect({{400.0f, 200.0f}, {600.0f, 400.0f}}, 20.0f);
engine().renderEffect(kke::BlurEffect(30.0f), blurRect);
kke::StrokeAppearance blurRectStrokeStyle{0.5f};
engine().renderEffect(
blurRect,
kke::EffectSourceAppearance{},
kke::ShadowEffect{
.color = {0.0f, 0.0f, 0.0f, 0.3f},
.mode = kke::ShadowMode::OuterShadowOnly
}
);
engine().draw(blurRect, kke::SolidColorBrush({1.0f, 1.0f, 1.0f, 0.6f}), blurRectStrokeStyle);
engine().fill(blurRect, kke::SolidColorBrush({1.0f, 1.0f, 1.0f, 0.2f}));
kke::Text title{
L"KKE Renderer",
{425.0f, 280.0f},
{"Space Grotesk", 24.0f, kke::FontWeight::BOLD}
};
engine().renderEffect(
title,
kke::EffectSourceAppearance{},
kke::ShadowEffect{
.color = {0.0f, 0.0f, 0.0f, 0.3f},
.mode = kke::ShadowMode::OuterShadowOnly
}
);
engine().fill(title, kke::SolidColorBrush({1.0f, 1.0f, 1.0f, 1.0f}));C++20- Windows / Direct2D / DirectWrite / WIC
kke::D2dEnginebased API- Shape rendering:
fill,draw - Text rendering and font upload
- Text size measurement
- Texture upload and rendering
- Layer rendering:
pushLayer - Explicit offscreen canvas recording:
beginCanvas,endCanvas,finishCanvas - Effect rendering:
renderEffect - Included demos: blur, shadow, text, texture, canvas, layer, transform
src/kke/engine/Engine.hh: public engine interfacesrc/kke/engine/Sources.hh: variant-based source types used by the APIsrc/kke/engine/d2d: Direct2D backend implementationsrc/kke/geometry: geometry and primitive typessrc/kke/appearance: brushes, text, transforms, effects, and other draw parameterstest: non-interactive unit testsexample/render_tests: interactive Windows rendering test applicationexample/overlay: injectable Direct3D 11 overlay example using Kiero and MinHookbenchmarks: focused rendering microbenchmarks
A minimal CMake flow looks like this:
cmake -S . -B build
cmake --build build --config DebugThis produces the kke static library, unit-test executables, and benchmark executables.
Configure with KKE_BUILD_EXAMPLES=ON to also build kke_render_tests and the overlay example.
When kke is consumed as a subproject through FetchContent or add_subdirectory, tests,
benchmarks, and examples are not built by default.
After installing the library, consumers can use find_package:
find_package(kke CONFIG REQUIRED)
target_link_libraries(my_app PRIVATE kke::kke)The docs are organized by usage domain instead of backend internals:
kke::D2dEngineaddsbeginDrawandendDrawon top ofkke::Engineto define the Direct2D frame boundary.- In the current tests, simple shapes such as
kke::Rectandkke::Ellipseare passed directly tofillanddrawwithout manually wrapping them inkke::Geometry.

