Odin bindings for RGFW,
Backends supported includes, X11, Cocoa and Windows, Web has not been tested and Wayland support has not yet been included.
Currently the graphics backend supports OpenGL, EGL, Vulkan, Metal, DirectX and buffer rendering, WebGPU helpers are not included.
To build the Odin binding simple run
make build-RGFW
you can also run make to build and then run an example program or make debug to build from scratch then run an example program.
A basic example can be found in basic.odin, it includes a basic OpenGL example of just about all of RGFW's functionalities.
A basic example can be found in basic-buffer.odin, it includes a basic OpenGL example of buffer rendering with odin
package main
import "core:fmt"
import "RGFW"
import gl "vendor:OpenGL"
main :: proc() {
RGFW.init("example", .initOpenGL);
defer RGFW.deinit();
window := RGFW.createWindow("window", 200, 200, 200, 200, .windowCenter | .windowOpenGL);
RGFW.window_makeCurrentContext_OpenGL(window);
gl.load_up_to(3, 3, RGFW.setProcAddress_OpenGL)
for (!RGFW.window_shouldClose(window)) {
RGFW.pollEvents();
gl.Clear(gl.COLOR_BUFFER_BIT)
gl.ClearColor(0, 0, 0, 1.0)
RGFW.window_swapBuffers_OpenGL(window);
}
RGFW.window_close(window);
}This can be compiled with
odin run [file].odin -file
- email : ColleagueRiley@gmail.com
- discord : ColleagueRiley
- discord server : https://discord.gg/pXVNgVVbvh
More information about RGFW can be found on the RGFW repo
There is a lot of in-header-documentation, but more documentation can be found here
If you wish to build the documentation yourself, there is also a Doxygen file attached.
