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 RGFW binaries for the Odin binding run
make or ./build.bat on Windows
package main
import "RGFW"
import gl "vendor:OpenGL"
main :: proc() {
RGFW.init("example", {.OpenGL})
defer RGFW.deinit()
window := RGFW.createWindow("window", 200, 200, 200, 200, {.Center | .OpenGL})
defer RGFW.window_close(window)
RGFW.window_makeCurrentContext_OpenGL(window)
gl.load_up_to(3, 3, RGFW.setProcAddress_OpenGL)
for !RGFW.window_shouldClose(window) {
RGFW.pollEvents()
gl.ClearColor(0, 0, 0, 1)
gl.Clear(gl.COLOR_BUFFER_BIT)
RGFW.window_swapBuffers_OpenGL(window)
}
}This can be compiled with
odin run [file].odin -file
You can find more examples here
They can all be compiled with
cd example/[example]
odin run .- email : ColleagueRiley@gmail.com
- discord : ColleagueRiley
- discord server : https://discord.gg/pXVNgVVbvh
