The Nim GUI/2D framework based on OpenGL and SDL2.
- Install this repo
nimble install nodesnim
ornimble install https://github.com/Ethosa/nodesnim.git
- Install dependencies
- Linux (tested on Ubuntu and Mint):
sudo apt install -y freeglut3 freeglut3-dev
sudo apt install --fix-missing -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
- Windows / MacOS:
- SDL2
- SDL2_image
- SDL2_mixer
- freeGLUT
- Put Runtime binaries in the
.nimble/bin/
folder
- Linux (tested on Ubuntu and Mint):
- Godot-like node system.
- Simple usage
import nodesnim Window("Hello, world!") var scene = Scene("Main") hello = Label() hello.setText("Hello, world!") hello.setSizeAnchor(1, 1) hello.setTextAlign(0.5, 0.5, 0.5, 0.5) scene.addChild(hello) addMainScene(scene) windowLaunch()
This section contains links to documentation for all nodes.
For use debug mode you should compile with -d:debug
or --define:debug
, e.g. nim c -r -d:debug main.nim
.
Use the Nim compiler user guide
for export to the other OS.
- CrossPlatform export for Windows (tested on Windows 7 x64 and Windows 10 x64)
nim c -d:mingw -d:release --opt:speed --noNimblePath file.nim
- put Runtime binaries in the folder with the program.
Q: Where can I see examples?
A: You can see this in the tests
or examples
folder.
Q: Where can I read the docs?
A: You can read docs here