Backend
Instance Members
File I/O operations backend service. Handles reading/writing files and persistent key-value storage.
Platform information backend service. Provides system information like platform type, version, etc.
Audio backend service. Handles sound loading, playback, and audio filters.
Rendering backend service. Handles OpenGL/WebGL drawing operations, shaders, and render targets.
Text loading backend service. Handles loading and processing of text files.
Binary data loading backend service. Handles loading and processing of binary files.
Texture management backend service. Handles loading, creating, and managing OpenGL textures.
Shader management backend service. Handles loading, compiling, and managing OpenGL shaders.
Screen/display backend service. Handles window management, fullscreen, resolution, and display properties.
Input handling backend service. Handles keyboard, mouse, touch, and gamepad input events.
Text input backend service. Handles on-screen keyboards and text input controls.
Clipboard backend service. Handles system clipboard operations for cut/copy/paste functionality.
Initializes the Clay backend with the given Ceramic application.
This method performs platform-specific initialization including:
- SDL binding (on SDL-enabled platforms)
- Disabling momentum scrolling on macOS
- Platform-specific native initialization
Name | Type | Description |
---|---|---|
app |
ceramic.App | The Ceramic application instance to initialize with |
Sets the target framerate for the application.
Controls the application update rate and minimum frame time:
- Updates Clay's update rate configuration
- Sets minimum frame time to 75% of target frame time on desktop platforms
- Use 0 or negative FPS to disable frame rate limiting
Name | Type | Description |
---|---|---|
fps |
Int | Target frames per second (0 or negative to disable limiting) |
Creates a new Clay backend instance. All backend services are automatically instantiated.
Private Members
Fired when the backend is ready and fully initialized. This event is emitted after all backend services are set up.
Fired every frame during the update phase.
Name | Type | Description |
---|---|---|
delta |
Float | Time elapsed since the last update in seconds |
Fired every frame during the render phase. This event is emitted after the update phase is complete.
Fired when an SDL event is received (SDL platforms only). Provides direct access to low-level SDL events for advanced use cases.
Name | Type | Description |
---|---|---|
event |
clay.sdl.SDLEvent | The SDL event data |
Metadata
Name | Parameters |
---|---|
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:headerCode |
"#include "linc_sdl.h"" |
:allow |
backend.Main |
:allow |
backend.Textures |
:allow |
backend.ClayEvents |