Repository navigation
v1.19.0
Meshes a game builds can be added, replaced and freed while it runs, windows remember where they were and how they were shown, Windows games open without a console window, and captures of windowed games show all their art. RecursiveAI.OneGame.Physics ships as 1.19.0-preview.1.
Added
- Meshes built, replaced and freed at run time.
SceneView3D.Models.SetMesh(id, material, vertices, indices)adds or replaces a mesh by name (entities draw it withSceneWriter.Modellike any model),RemoveandReplacefree or swap models and meshes, andContainschecks a name.Renderer3D.CreateMaterialmakes a shared material without a glTF file, andRenderer3D.CreateMeshreturns aDynamicMesh3D(Update,Dispose) for a hand-filledScene3D. Buffers are sized in classes and reused, updates copy through the device's staging memory, freed buffers are released once the GPU has finished with them, and nothing waits for the GPU; a soak of thousands of swaps holds GPU memory flat and steady frames allocate nothing. SceneWriter.Model(..., ModelOptions)sets a per-draw opacity and label (ModelOptions.Opacity,Label,Pickable).scene_modelslive-control operation lists what the 3D view draws: model, label, opacity, entity, triangle count, position, and whether the mesh was built at run time.GpuDevice.MemoryStatsreports the backend's device-memory tally (Vulkan).- Window placement.
Window.Placementreads where a window is and how it is shown as a plainWindowPlacementvalue (normal rectangle in screen pixels plusNormal/Maximized/Fullscreen) that a game can save withFormat()and read back withTryParse;WindowOptions.Placementcreates a window from it (a maximized window is created maximized, remembering the rectangle to restore to), andWindow.ApplyPlacement,Maximize,RestoreandMoveTochange a live one. A placement saved on a monitor that is gone is moved onto a connected screen (PlatformApp.GetWorkAreas,WindowPlacement.ClampTo). Win32 and X11 (EWMH) place position and state; Wayland and Cocoa place size and state only (xdg-shell has no position request); phones and browsers do nothing.Windowkeeps all its existing members. - Live control
windowoperation: read and set the placement (x,y,width,height,state, or a whole placement astext). - A Windows game is built as a GUI-subsystem program with no console window by default (a
win-*runtime identifier, or a Release build on Windows).OneGameConsole=truekeeps the console andOneGameConsole=falsemakes a Debug build GUI too; a game that setsOutputTypetoWinExeitself is unchanged.ParentConsole.Attach(), called byGameApp.Run, prints to the terminal that started the program; redirected output is untouched.
Fixed
- Captures taken in a windowed game (
capture_frame,capture_sequence, scenario andonegame capturecaptures) could miss art the window had not drawn before, and could show stale glyph pages. The capture rendered in a different pixel format than the window's swapchain, which gave it a second renderer, and the art atlas hands each upload (large standalone rasters, changed pages) to one renderer only. Captures now render in the swapchain's format, so there is one renderer and one set of textures, and the read-back swaps the channels.