14 unstable releases (3 breaking)
0.4.0 | Jan 6, 2022 |
---|---|
0.3.3 | Jan 6, 2022 |
0.3.0 | Sep 10, 2021 |
0.2.3 | Apr 24, 2021 |
0.1.0 | Nov 20, 2020 |
#1149 in Game dev
49 downloads per month
610KB
12K
SLoC
Rokol
Bindings to Sokol for personal use. API
Very early in progress..
About
Status
- Rokol only cares about desktop platforms.
- Rokol only supports GlCore33 backend (for now).
- Rokol is tested on macOS only. You could find it doesn't compile out of the box. Please open an issue then!
Features
Enable features:
impl-app
: Compilesokol_app.h
sdl2
: Use SDL2impl-gfx
: Compilesokol_gfx.h
. Specify graphics backend with feature:glcore33
: compilesokol_gfx.h
with GlCore33 backend
fontstash
: Add rokol graphics support for FontStash
Notes
My devlog is here.
lib.rs
:
Wrapper of Sokol libraries
Features (specified in Cargo.toml
)
Example settings:
rokol = { features = ["sdl", "impl-gfx", "glcore33", "fontstash"] }
impl-app
: implementssokol_app.h
and enablesapp
modulesdl2
: generatesglue
code forsdl2
impl-gfx
: implementssokol_gfx.h
and enablesgfx
moduleglcore33
: uses OpenGL backendmetal
: uses Metal backendd3d11
: uses DirectX11 backendfontstash
: implementsfontstash.h
and enablesfons
module
Tips
- Checkout The Brain Dump
- Sokol considers zero-initizialized structures to be in default state. It means
Default::default
is ensured to make sense! - use
bytemuck
to cast types to&[u8]
.
Dependencies
~19MB
~408K SLoC