OPENHOOPS / 2K14Final team archive · November 9, 2026Reference libraryChecksums

Dated source reference. Current release status: handoff state. Full original relative paths are in the developer archive.

Draw-demand notification, version 1

The optional Windows Demand.1 observation wakes the presentation producer after the adapter publishes the current native component's content and facts. It removes the producer's remaining periodic sleep when new native work arrives. The game thread never waits for the producer. This notification cannot authorize native omission, indicate sequence completion, or make old pixels current.

The host creates Local\OpenHoops.Presentation.Demand.1.<token> and its auto-reset <name>.event before making the presentation channel available. The token is the same 32 lowercase hexadecimal characters supplied to the trusted pixel producer. The producer opens the mapping with FILE_MAP_READ and the event with SYNCHRONIZE; it never creates substitutes. It verifies the owning PID and process creation time against the already verified pixel host. An absent mapping means an older host and periodic scheduling. A present but malformed mapping, missing event or foreign process is an error.

The 64-byte little-endian header uses eight-byte alignment:

Offset Type Field
0 char[8] OHPDMN1 followed by a zero byte
8 uint32 version, 1
12 uint32 header bytes, 64
16 uint32 owning game PID
20 uint32 reserved, zero
24 uint64 game process creation FILETIME
32 uint32 publication sequence
36 uint32 requested owner mask, bits 0 through 30
40 uint32 current device generation
44 uint32 reserved, zero
48 uint64 current native Present number, starting at 1
56 uint64 GetTickCount64 observation time

One render-thread writer increments sequence to odd before updating the mutable fields and to even after a memory barrier, then signals the event. Readers copy only an equal, even sequence before/inside/after the copy. A zero sequence means no request. Work hints expire after 100 ms and cannot cross a device generation. The mask accumulates distinct owners within one Present; the first owner in the next Present starts a new mask. Multiple primitive draws for the same owner do not repeatedly signal. Reset clears the mask and signals the new generation. Auto-reset coalesces requests for the single pixel producer; consumers needing passive observation should read the mapping without waiting on the producer's event.

The producer may prioritize these owners in its existing bounded plane budget. It still verifies public source identity and age, native observation freshness, declared data dependencies, exact instance/occurrence/content revision, canvas, device generation and pixel lifetime. The host checks those again at the actual native draw. A request for an unsupported or unready component retains native drawing. A wake does not clear or relax any of those checks.

presentation.framework.demand.Demand supplies the reference read/wait client. Its wait includes the exact owning game process, so process exit interrupts a wait immediately. Clients retain a periodic deadline even with notifications; losing or coalescing a wake does not stall source expiry or control processing. Pixel transport version 3 and main snapshot ABI26 are unchanged.

Version 1 is a scheduling mechanism. Native per-Present smoothness acceptance requires a game trace for the final candidate and remains a separate gate.