acron.window¶
The window: the prc a game needs before ShowBase, the Retina re-request, and a frame rendered from inside a long call.
Three rules from RUNTIME.md, as one place (found building REGOLITH’s seat; every app on this engine hits them in the same order):
apply_prc()— what must be in the prc BEFORE ShowBase exists: the window’s title, the stencil buffer RmlUi clips with (rule 4), no MSAA (rule 13: on the Apple GL path multisampling is the dominant frame cost; a ship target that does not pay it turns it back on), anddpi-aware(rule 19: without it a Retina window gets a 1× point backing stretched 2× and everything renders at half the linear resolution the display has). Optionally the filesystem root on the model-path, so an RmlUi<img src="/abs/path">resolves — RmlUi’sJoinPathstrips the leading slash and the engine’s file interface falls back to the model-path.fit_window()—dpi-awaremakes the requestedwin-sizedevice pixels, so the default window would open at half its POINT size on a Retina display: re-request it atsize × display zoomafter opening (same physical window, real pixels behind it). Everything downstream re-fits off the resize event. Offscreen buffers are exact-size and untouched.blocking_frame()— a bake is one long call and nothing else runs a frame until it returns; a loading bar advanced from inside its progress callback needs a frame rendered right there. With the scene half-built a shader can exist whose per-frame inputs do not yet (rule 17: Acron asserts on a declared uniform with no input), so the caller names what to hide for the frame —render, typically.
Global Functions
- apply_prc(title: str, *, stencil: bool = True, msaa: bool = False, dpi_aware: bool = True, absolute_img_src: bool = False, name: str = 'acron-window') None¶
Engine settings that must be in place before ShowBase exists.
namelabels the prc data (whatprint(cpMgr)shows). The stencil line isacron.ui.apply_prc()’s — the one line a game that sets the rest of its prc itself still needs (RUNTIME rule 4).