Skip to content

PlatformAPI reference

Namespace MicroEngine.Raylib

The raylib platform for desktops (in the published SDK, also the browser platform).

Guide: Backends and platforms

Classes

DesktopLauncher

Entry point for desktop games on raylib only: the shared launcher model (GameHost, the arguments of GameLauncher) with the raylib and headless platforms. Games that should run on the recommended platform of each system use MicroEngine.Desktop.DesktopLauncher instead.

DesktopOptions

Window options of a raylib platform created directly (browser hosts); hosts with a PlatformRequest use #ctor. Every option is set by name (new DesktopOptions { Hidden = true, Mute = true }): there is no positional constructor, so a call written for the earlier positional shape (whose third argument was a fixed-step flag) fails to compile instead of meaning something else.

RaylibDeviceFactory

Factory of the tier-0 raylib device (“raylib”). raylib owns one window and one OpenGL context per process, so the device accepts only raylib’s own window: the surface whose native window is raylib’s, once raylib has opened it.

RaylibDevice

The tier-0 graphics device on raylib’s OpenGL layer (rlgl): textures and render targets are OpenGL textures and framebuffers, buffers are device-owned CPU memory whose triangles are sent through rlgl’s batch, the built-in pipeline is rlgl’s default shader with the pass’s blend factors, and samplers are texture parameters set before each draw. Offscreen targets are rendered with row 0 at the top of the texture’s memory, so uploads, sampling and readback need no flipping and OpenGL’s tie rule gives the contract’s top-left rule; the window’s target (bottom-up in OpenGL) moves geometry up by 1/128 px for the same rule. Desktop OpenGL declares render targets, repeat and mirror addressing, separate filters and custom blend states; in browsers (WebGL) only render targets are declared.

RaylibPlatform

raylib-backed platform. Games draw into a virtual-resolution render texture which is scaled to the window by the largest integer factor that fits (letterboxed), keeping pixel art crisp. A desktop platform (the second implementation of the platform contract beside SDL); browsers run the SDL platform. Its capabilities (TryGetCapability``1): IDisplayControl, IDisplayPacing, ITouchScreen and IPreciseDelay.

RaylibTouchScreen

Touches for the raylib platform. raylib’s own touch state is a per-frame list of points indexed by position (no cancel, no reliable identity across frames), so it is not used: a raylib window reports no touches; its controls still lay out for scripted touches.