floooh/sokol
View on GitHub ↗ ★ 10,403 C
minimal cross-platform standalone C headers
42 mentions on Hacker News by 18 people: 3 stories, 39 comments · first 2019-11-09 · latest 2026-10-27
20082026
-
…And (shameless plug): sokol-gfx tries to find a balance between simplicity and modern 3D APIs: https://github.com/floooh/sokol Demos with links to C source and shader code: WebGL2 backend: https://floooh.github.io/sokol-html5/ WebGPU…
comment by flohofwoe · 2026-10-27 · in I still teach OpenGL ES 3.0 -
…is more higher level both can be used. Otherwise learn opengl is a really good introduction. [0] https://github.com/floooh/sokol [1] https://wiki.libsdl.org/SDL3/CategoryGPU
comment by AyanamiKaine · 2026-07-23 · in Learn OpenGL, extensive tutorial resource for learning Modern OpenGL -
…abstraction (e.g. window system glue, 3D APIs or audio APIs) happens via the sokol headers though: https://github.com/floooh/sokol
comment by flohofwoe · 2026-03-11 · in Making WebAssembly a first-class language on the Web -
…is amazing. One of my favourite libraries ever is Sokol, which is used for those emulators AFAIR: https://github.com/floooh/sokol It hits the spot for me in terms of features, small-size and ease of use/embedding. Every other library has…
comment by whstl · 2025-04-28 · in Tiny Emulators -
…rendering, audio, low level touch input) you can also check out the Sokol headers (shameless plug): https://github.com/floooh/sokol , or I guess SDL will work too (especially with the new GPU API in SDL3) - at least the sokol header…
comment by flohofwoe · 2025-04-18 · in Is it possible to write plain C iOS app in 2025? -
…maximize transition the window content doesn't scale), but the basic wobbling fix is fairly simple: https://github.com/floooh/sokol/pull/963 In general I have the impression that Kitty feels quite 'heavy' on macOS compared to both Wezterm…
comment by flohofwoe · 2025-01-31 · in Release Notes for Ghostty 1.1.0 -
Or Sokol: https://github.com/floooh/sokol
comment by jops · 2024-12-08 · in Flappy Bird in 1000 lines of C -
…There is also bgfx ( https://github.com/bkaradzic/bgfx ), which is quite popular and sokol gfx ( https://github.com/floooh/sokol ) which I know of. Of course there are many more lesser known ones.
comment by dxuh · 2024-08-30 · in SDL3 new GPU API merged -
…uses a library which abstracts away the differences between the system 3D APIs (shameless plug: https://github.com/floooh/sokol , but also BGFX, WebGPU or AFAIK SDL3 is also getting a cross-platform 3D API), or uses a complete game engine…
comment by flohofwoe · 2024-06-06 · in Vulkan1.3 on the M1 in one month -
…Metal canvas in a window) in various non-Apple languages (currently C, C++, Zig, Rust, Odin, Nim): https://github.com/floooh/sokol ...I'm cheating though and use ObjC under the hood to talk to Cocoa and Metal ;)
comment by flohofwoe · 2024-04-19 · in C-Macs – a pure C macOS application -
You might like https://github.com/floooh/sokol
comment by corysama · 2024-01-07 · in STB: Single-file public domain libraries for C/C++ -
…https://floooh.github.io/sokol-html5/ Platform abstraction is handled through the sokol headers: https://github.com/floooh/sokol Dear ImGui is small and fast enough for running in browsers (it will add up to a few hundred KBytes of WASM…
comment by flohofwoe · 2024-01-04 · in Container2wasm: Convert Containers to WASM Blobs -
I wonder if using your library ( https://github.com/floooh/sokol ) instead of OpenGL will alleviate some of these issues for newcomers! There's already a sokol port of the learnopengl.com code ( https://github.com/GeertArien/learnopengl-exa…
comment by cyber_kinetist · 2023-10-11 · in Vulkan Documentation -
If you're looking for something like this, Sokol is a much simpler alternative: https://github.com/floooh/sokol It doesn't support vulkan though, but if that's important to you you're probably much better off just using vulkan directly…
comment by joeld42 · 2023-07-07 · in Meta releases Intermediate Graphics Library -
…ticket links where users of my libraries stumbled over the issue (and with different symptoms): - https://github.com/floooh/sokol/issues/376 - https://github.com/floooh/sokol/issues/404 - https://github.com/floooh/cimgui-sokol-starterkit/is…
comment by flohofwoe · 2023-07-02 · in Why glibc 2.34 removed libpthread -
My stuff for instance: https://github.com/floooh/sokol ...inspired by: https://github.com/nothings/stb (here's how the sokol headers are integrated into a Zig project, note that there is only a build.zig which builds everything:…
comment by flohofwoe · 2023-06-30 · in File for divorce from LLVM -
…of embedded Javascript functions which can be called like C functions directly from the "C side": https://github.com/floooh/sokol/blob/4535a3b4be59eb912e77e04...
comment by flohofwoe · 2023-05-03 · in I want to talk about WebGPU -
…support: https://wiki.libsdl.org/SDL2/README/emscripten My own cross-platform headers too: https://github.com/floooh/sokol ...there are also auto-generated Zig bindings btw ;) https://github.com/floooh/sokol-zig
comment by flohofwoe · 2023-04-29 · in Learn WebGPU -
…- still it's good to have a "native fallback"): https://floooh.github.io/tiny8bit/ Also see: https://github.com/floooh/sokol and https://floooh.github.io/sokol-html5/index.html . (e.g. for me it's a way to easily get my C/C++…
comment by flohofwoe · 2023-03-21 · in A world to win: WebAssembly for the rest of us -
…those, plus the web, iOS and Android (granted I wrote my own set of wrapper libs to make this easy: https://github.com/floooh/sokol - but it's not like that's the only slim solution for cross-platform code).
comment by flohofwoe · 2023-03-02 · in The JavaScript era happened because we were fed a line -
Interesting.. i personally use that a lot in C, this lib for example: https://github.com/floooh/sokol#sokol_gfxh I couldn't live without it https://dlang.org/spec/struct.html#static_struct_init D support it, what's blocking it?
comment by Kukumber · 2022-11-02 · in Next C compiler is a D compiler: Introducing DMD's ImportC -
…can directly include C headers) or use the header to auto-generate the bindings. For example: - https://github.com/floooh/sokol-zig - https://github.com/floooh/sokol-nim - https://github.com/floooh/sokol-odin These are all auto-generated…
comment by flohofwoe · 2022-10-13 · in Tinyphysicsengine: Minimalist 3D C99 single-header physics engine -
…the Emscripten port of SDL, which otherwise seems to be the "default" when people do these things. https://github.com/floooh/sokol
comment by vinkelhake · 2022-09-28 · in D3wasm 0.4 – Doom 3 in WASM -
…platform GPU libs, bgfx [1] or sokol [2] for example [1] - https://github.com/bkaradzic/bgfx [2] - https://github.com/floooh/sokol
comment by Kukumber · 2022-09-23 · in The journey to Nintendo Switch -
…code to Sokol, lot's of really good decisions there and I love the minimal C -style structure: https://github.com/floooh/sokol
comment by inDigiNeous · 2022-09-10 · in Ask HN: What's the best source code you've read? -
…lot of fun to tinker around with this stuff in Zig :) [0] https://github.com/floooh/pacman.zig [1] https://github.com/floooh/sokol [2] https://github.com/floooh/sokol-zig [3] https://github.com/schellingb/wajic
comment by flohofwoe · 2022-07-13 · in Zig and WASM -
…and not "great" as in "created by a big Silicon Valley company", but check out the sokol headers: https://github.com/floooh/sokol ...live samples: https://floooh.github.io/sokol-html5/index.html
comment by flohofwoe · 2022-06-20 · in Notes on WebAssembly -
Quick shout-out to a graphics abstraction library that works quite well: sokol. https://github.com/floooh/sokol It has DX11, Metal, and OpenGL backends (with optional shader compilation tool from GLSL to each target), which is probably all…
comment by cyber_kinetist · 2022-06-03 · in Deprecation of OpenGL and OpenCL (2018) -
Some other interesting libraries I've seen along these lines: - Sokol (sokol_gfx in particular): https://github.com/floooh/sokol - wgpu (see wgpu-native for the C API): https://github.com/gfx-rs/wgpu It kind of seems like graphics…
comment by gary_0 · 2022-04-26 · in Magnum: Lightweight, modular C++11 graphics middleware for games/visualization -
…count just for the memory management of a single 3D backend which simply doesn't seem "right". See: https://github.com/floooh/sokol/blob/master/sokol_gfx.h
comment by flohofwoe · 2021-07-21 · in Vulkan Memory Allocator -
…in the browser. It is an obstacle (at least a massive annoyance) for library authors (like this: https://github.com/floooh/sokol ). Those libraries can be used for extremely simple and small WASM snippets embedded in blog posts (like here:…
comment by flohofwoe · 2021-05-18 · in First Public Working Drafts: WebGPU and WebGPU Shading Language -
…GLFW as intermediate layer, but this could also be SDL, or - shameless plug - the sokol headers ( https://github.com/floooh/sokol ), or (more commonly) a game engine like Unity, Unreal Engine, or your own code.
comment by flohofwoe · 2021-02-22 · in Nuklear: A cross-platform GUI library in C -
…enable WASM apps in the "dozens of KBytes" range, and you get native-platform support "for free": https://github.com/floooh/sokol Check out these samples and have a look at the size in the browser devtools which are IMHO quite sensible:…
comment by flohofwoe · 2021-02-11 · in Migrating a JavaScript Library from JavaScript to WebAssembly -
…Apple and older hardware. We use Sokol, an amazing wrapper library, and it only supports the big 3. https://github.com/floooh/sokol
comment by amedvednikov · 2020-12-22 · in V (Vlang) 0.2 -
…out sokol_gfx.h (and maybe sokol_gl.h, which is a simple GL 1.x style API on top of sokol_gfx.h): https://github.com/floooh/sokol
comment by flohofwoe · 2020-11-06 · in Ray Tracer Sandbox in Vulkan -
…also a header with a Dear ImGui rendering backend sitting on top of sokol_app.h and sokol_gfx.h): https://github.com/floooh/sokol ...and here's a minimal standalone starter project for writing Dear ImGui apps in C I just created a couple…
comment by flohofwoe · 2020-11-04 · in Dear ImGui – Bloat-free graphical user interface library for C++ -
…can be beautiful. Sokol exemplifies this.[1] [0] https://news.ycombinator.com/item?id=23800729 [1] https://github.com/floooh/sokol/blob/master/sokol_gfx.h
comment by rl3 · 2020-08-15 · in Brain Oriented Programming -
…also created the excellent Sokol cross-platform graphics/sound library, which is being used here. https://github.com/floooh/sokol
comment by rlp · 2019-11-09 · in Visual6502 Remix