Yet another ImGui wrapper for Ruby
- Created : 2019-01-05
- Last modified : 2022-02-12
[Notice] This project is experimental.
Prerequisites
- Ruby interpreter
- Tested on:
- [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
- ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
- [macOS]
- ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
- ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
- [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
- Tested on:
- Ruby Gems
- opengl-bindings
- gem install opengl-bindings
- ffi
- gem install ffi
- opengl-bindings
- Compiler
- Tested on:
- [Windows] gcc (Rev1, Built by MSYS2 project) 8.2.1 20181214
- [macOS] clang (Apple clang version 12.0.5 (clang-1205.0.22.11), Target: arm64-apple-darwin20.6.0)
- Tested on:
- CMake https://cmake.org/download/
Setting up and run sample
- Update cimgui submodule
- For the first time:
- git submodule update --init --recursive
- Update:
- cd cimgui
- git pull origin master <- to get latest cimgui
- git submodule update <- to get specific revision of imgui required by cimgui
- For the first time:
- Get GLFW or SDL2
- GLFW : Use glfw_build.bat (Windows) or glfw_build.sh (macOS)
- Build imgui library
- Use imgui_dll_build.sh (macOS)
- Use imgui_dll_build.bat (Windows)
- e.g.)
-
ridk enable <- Activates msys2 GCC
-
imgui_dll_build.bat "D:\Program Files\CMake\bin\cmake.exe" <- You can give absolute path to cmake.exe as the 1st argument
-
- e.g.)
- Run test.rb
- cd sample/
- ruby test_glfw_opengl2.rb (GLFW)
- ruby test_sld2_opengl2.rb (SDL2)
License
'imgui.dylib', 'imgui.dll' and 'imgui_debug.dll' are built on top of these products and are available under the terms of the MIT License.
- cimgui ( https://github.com/cimgui/cimgui )
- Dear ImGui ( https://github.com/ocornut/imgui )
All ruby codes here are available under the terms of the zlib/libpng License ( http://opensource.org/licenses/Zlib ).
Ruby-Imgui : Yet another ImGui wrapper for Ruby Copyright (c) 2019-2022 vaiorabbit http://twitter.com/vaiorabbit
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.