sokol

Cross-platform graphics and audio library bindings for Kit using sokol-zig

Files

FileDescription
.editorconfigEditor formatting configuration
.gitignoreGit ignore rules for build artifacts and dependencies
.tool-versionsasdf tool versions (Zig, Kit)
LICENSEMIT license file
README.mdThis file
examples/blend.kitExample: blend
examples/buffer-offsets.kitExample: buffer offsets
examples/clear.kitExample: clear
examples/cube.kitExample: cube
examples/debug-text-print.kitExample: debug text print
examples/debug-text-userfont.kitExample: debug text userfont
examples/debug-text.kitExample: debug text
examples/defer-pattern.kitExample: defer pattern
examples/instancing-compute.kitExample: instancing compute
examples/instancing.kitExample: instancing
examples/mrt.kitExample: mrt
examples/noninterleaved.kitExample: noninterleaved
examples/offscreen.kitExample: offscreen
examples/quad.kitExample: quad
examples/saudio.kitExample: saudio
examples/sgl-context.kitExample: sgl context
examples/sgl-points.kitExample: sgl points
examples/sgl.kitExample: sgl
examples/shapes.kitExample: shapes
examples/tex-cube.kitExample: tex cube
examples/triangle.kitExample: triangle
examples/vertex-pull.kitExample: vertex pull
kit.tomlPackage manifest with metadata and dependencies
src/sokol.kitSokol error type for typed error handling.
tests/sokol.test.kitTests for sokol
zig/kit_ffi.zigZig FFI module for kit ffi
zig/sokol_wrapper.zigZig FFI module for sokol wrapper

Dependencies

No Kit package dependencies.

Installation

kit add gitlab.com/kit-lang/packages/kit-sokol.git

Usage

import Kit.Sokol

License

MIT License - see LICENSE for details.

Exported Functions & Types

SokolError

Sokol error type for typed error handling.

Variants

SokolConfigError {message}
SokolCallbackError {message}
SokolGraphicsError {message}
SokolNotImplementedError {message}

rgb

Create a color from RGB values (0-255).

Int -> Int -> Int -> {r: Float, g: Float, b: Float, a: Float}

rgba

Create a color from RGBA values (0-255).

Int -> Int -> Int -> Int -> {r: Float, g: Float, b: Float, a: Float}

colors

Common colors.