Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

impeller-zig-examples

Runnable SDL3 and GLFW examples for impeller-zig.

Prerequisites

Install Zig 0.16.0 directly, or use mise to install the toolchain pinned by this repository:

mise install

Only is optional and provides shorter versions of the commands below.

Build

Build both the API showcase and the shader example:

zig build
# or:
# only build

Run Examples

SDL3 is the default window backend:

zig build run
# or:
# only run

Run the API showcase with GLFW instead:

zig build run -Dbackend=glfw
# or:
# only run glfw

Run Shader Example

The shader example always uses SDL3, with Vulkan on Linux and Windows or Metal on macOS:

zig build run-shader
# or:
# only run-shader

Linux

The SDL3 Linux example forces the X11 video driver for now.

Cross-compilation

Cross compile with Zig's standard target option. For example, Linux to Windows:

zig build -Dtarget=x86_64-windows-gnu

Supported Impeller SDK targets:

Platform -Dtarget
Linux x64 x86_64-linux-gnu
Linux arm64 aarch64-linux-gnu
macOS x64 x86_64-macos
macOS arm64 aarch64-macos
Windows x64 x86_64-windows-gnu
Windows arm64 aarch64-windows-gnu

Cross-compilation depends on the window backend.

macOS targets require Apple's SDK/frameworks. GLFW currently cannot target Linux arm64 from a Linux x64 host.

About

Runnable SDL3 and GLFW examples for impeller-zig

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages