How beratdizdar/cd3d11 works
cd3d11 is a small C wrapper around Direct3D 11, intended to simplify C-side API use and COM object lifetime management. The principal workflow is to open and select a device instance, create resources and shaders, configure the pipeline, then draw, clear, and present; timestamp queries are a separate capability. The README describes the usability goals but not call sequencing, so actor-to-entry links are dashed. Runtime behavior is evidenced by the sampled implementation; no separate application code is present.
Main entry points: d11_internal.c Shader creation · d11_open.c Open and close · d11_object.c Resource creation · d11.h Public API
Components 11
Device lifecycle
- Device state
d11_internal.h - Open and close
d11_open.c - COM and result helpers
d11_internal.c
GPU resources
- Resource creation
d11_object.c - Mapped updates
d11_internal.c
Rendering
- Shader creation
d11_internal.c - Pipeline selection
d11_internal.c - Draw and present
d11_internal.c
Timing and diagnostics
- Timestamp queries
d11_internal.c
Other components
- C application
- Public API
d11.h
Connections 13
- C application → Public API: uses
readme.md - Public API → Open and close: opens instance
d11.h - Open and close → Device state: creates state
d11_open.c - C application → Resource creation: creates resources
- C application → Mapped updates: updates buffers
- C application → Shader creation: creates shaders
- Shader creation → COM and result helpers: checks results
d11_internal.c - Shader creation → Shader creation: loads file shaders
d11_internal.c - C application → Pipeline selection: sets pipeline
- C application → Draw and present: executes rendering
- C application → Timestamp queries: measures time
- Open and close → COM and result helpers: releases objects
d11_open.c - Resource creation → COM and result helpers: releases slots
d11_object.c