Skip to content

PlatformAPI reference

Class RaylibDeviceFactory

Namespace: MicroEngine.Raylib
Assembly: MicroEngine.Raylib.dll
Guide: Backends and platforms

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.

C#
public sealed class RaylibDeviceFactory : IGraphicsBackendFactory

Inheritance

object ← RaylibDeviceFactory

Implements

IGraphicsBackendFactory

Constructors

RaylibDeviceFactory()

C#
public RaylibDeviceFactory()

Properties

Name

Backend name: “sdl-renderer”, “raylib”, “reference” (and, later, “sdl-gpu”).

C#
public string Name { get; }

Property Value

string

Methods

Create(ISurface?, GraphicsDeviceOptions)

Creates a device for surface (null = offscreen only, where the backend supports it).

C#
public IGraphicsDevice Create(ISurface? surface, GraphicsDeviceOptions options)

Parameters

surface ISurface?

options GraphicsDeviceOptions

Returns

IGraphicsDevice

UnsupportedReason(ISurface?)

Null when Create can succeed for surface, otherwise why not.

C#
public string? UnsupportedReason(ISurface? surface)

Parameters

surface ISurface?

Returns

string?