glfw
Version, currently 0.1.12 versions
- 0.1.1latestFeb 11, 2017
- 0.1.0not indexedOct 15, 2017
github.com/danini-the-panini/crystal_glfw
Idiomatic Crystal API to libglfw3
5 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
glfw:
github: danini-the-panini/crystal_glfw
version: ~> 0.1.1Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- Daniel Smith
Dependencies
Runtime Dependencies
- lib_glfw30.1.0github: jellymann/crystal_lib_glfw3
README
GLFW for Crystal
Idiomatic Crystal API to libglfw3. This shard provides an OOP wrapper around libglfw3, to make it easier to write GLFW apps in Crystal.
Installation
Add this to your application's shard.yml:
dependencies:
glfw:
github: jellymann/crystal_glfw
Usage
Example code for creating a window (tested on macOS 10.11)
require "glfw"
hints = {
LibGLFW3::OPENGL_PROFILE => LibGLFW3::OPENGL_CORE_PROFILE,
LibGLFW3::OPENGL_FORWARD_COMPAT => 1,
LibGLFW3::CONTEXT_VERSION_MAJOR => 3,
LibGLFW3::CONTEXT_VERSION_MINOR => 3
}
window = GLFW::Window.new(800, 600, "Hello, Crystal!", hints)
window.make_current
GLFW.swap_interval = 1
until window.should_close?
window.swap_buffers
GLFW.poll_for_events
end
Development
To run the specs
crystal spec
See also
Contributing
- Fork it ( https://github.com/jellymann/crystal_glfw/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
- jellymann Daniel Smith - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Feb 11, 2017
- Commit
c071bbfa3f7b- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/danini-the-panini/crystal_glfw
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 2