imgui-backends
Version, currently 1.90.66 versions
github.com/mattrbeck/crystal-imgui-backends
No description declared in shard.yml.
Installation
# Add this to your shard.yml
dependencies:
imgui-backends:
github: mattrbeck/crystal-imgui-backends
version: ~> 1.90.6Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Matthew Beck
- Target
examplefrom examples/imgui_impl_opengl3.cr
Dependencies
Runtime Dependencies
- sdl*github: ysbaddaden/sdl.cr, commit: 5a22270
- crystal-raw-gl*github: oprypin/crystal-raw-gl
Development Dependencies
- imgui*github: oprypin/crystal-imgui, tag: v1.90.6dev
README
crystal-imgui-backends
This shard makes it easy to use ImGui backends from Crystal.
Installation
-
Add the dependency to your
shard.yml:dependencies: imgui-backends: github: mattrbeck/crystal-imgui-backends tag: v1.90.6 # select your version here by git tag imgui: # chances are you want to include imgui as well github: oprypin/crystal-imgui tag: v1.90.6 # should match version used above -
Run
shards install
Usage
require "imgui-backends"
require "imgui-backends/lib"
# ImGui::<backend name>::method()
ImGui::OpenGL3.new_frame
ImGui::SDL2.new_frame(@window)
All backends are under a module sharing their name (like "SDL2" or OpenGL3"), which is in turn under the module "ImGui".
For a minimal example, run the following:
shards install
make
crystal examples/imgui_impl_opengl3.cr
For a concrete example using this shard, see https://github.com/mattrbeck/crab. The make shard is run as a postinstall step when this shard is installed, so ImGui links are generated automatically.
Development
Development is currently a manual process, and new backends are added as necessary. If you would like to use a backend or method that's not currently supported, you're welcome to add it following the convention in the src/ dir. If you add a new backend, it would be nice to create an example using that backend under examples/ as well.
Contributing
- Fork it (https://github.com/mattrbeck/crystal-imgui-backends/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Matthew Beck - creator and maintainer
Credit
- Oleh Pyrpin: This shard is heavily inspired by https://github.com/oprypin/crystal-imgui-sfml
- Omar Cornut: The example code is translated nearly directly from https://github.com/ocornut/imgui
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.90.6- Tagged
- Jan 6, 2026
- Commit
237f88f5f962- Crystal
1.0.0- Indexed
- yes
Dependents
Repository
github.com/mattrbeck/crystal-imgui-backends
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 22, 2026
- Synced
- Sep 22, 2026
- Versions
- 6