RenderingOptions Class
Definition
Namespace: Brine2D.Rendering
Configuration options for the rendering system.
Inheritance System.Object → RenderingOptions
| Properties | |
|---|---|
| MaxDeltaTimeMs | Gets or sets the maximum delta time in milliseconds applied per frame. Prevents runaway physics or update logic after a pause, debugger break, or frame spike. Default: 100ms. Set higher for games with heavy simulation; lower for tighter physics. |
| MaxParticlesPerFrame | Gets or sets the maximum number of particles that can be rendered per frame using hardware instancing. Each particle occupies one 48-byte instance record in the GPU buffer. Memory cost is approximately MaxParticlesPerFrame × 48 × 4 bytes \(1 instance buffer \+ 3 transfer buffers in\-flight\). The default of 20,000 uses ~3.8 MB total. Particles beyond this limit per emitter flush are silently dropped for that frame. |
| MaxVerticesPerFrame | Gets or sets the number of vertices that can be staged per GPU transfer pass. |
| MsaaSamples | Reserved for future MSAA support. Currently only 1 \(no MSAA\) is supported; values greater than 1 are logged as a warning and ignored. |
| PixelSnapping | Snaps sprite/primitive vertex positions to whole pixel coordinates before submitting to the GPU. Eliminates sub-pixel jitter on pixel-art games. Default: true. Disable for smooth sub-pixel movement \(e\.g\., physics\-driven objects at high resolution\). |
| PreferredGPUDriver | Preferred GPU driver backend. If null or Auto, SDL3 will automatically select the best driver for the platform. |
| TargetFPS | Gets or sets the target frames per second for the game loop. 0 = unlimited \(use VSync or monitor refresh rate\). |
| VSync | Synchronizes frame rate with the display refresh rate. Default: true. When disabled, use TargetFPS to cap the frame rate manually. |