RGFW is a multi-platform single-header and very simple-to-use framework library used for creating GUI Libraries or simple GUI programs. It is written to be as portable as possible and supports winapi, Xlib and cocoas for windowing APIs. For graphics APIs, it supports OpenGL legacy, modern OpenGL, Vulkan and DirectX. It lets you create a window with a graphics context (opengl, vulkan or directX) and manage the window and its events only with a few function calls.
Introduction
RGFW is a lightweight and versatile alternative to GLFW, written in C, which puts simplicity and flexibility at the forefront of your graphics programming experience.
At its core, RGFW is designed with performance in mind. With just a single header file, it offers a portable solution that can be seamlessly integrated into your projects. Built with C89 compatibility in mind, RGFW ensures broad accessibility across different platforms and environments.
What sets RGFW apart is its focus on keeping things small and nimble. Unlike other libraries, RGFW prioritizes efficiency and simplicity, allowing you to get up and running with minimal overhead.
With RGFW, you have the power to create windows and manage events with ease, all through a handful of intuitive function calls. Whether you're working with OpenGL, Vulkan, or DirectX, RGFW provides the tools you need to handle graphics contexts effortlessly.
If you're looking for a small, flexible, and easy-to-use alternative to GLFW, look no further than RGFW. Experience the simplicity and efficiency of Riley's Gui library FrameWork and unlock the true potential of your graphics projects.
Using the Code
Below is very basic example code (in C):
#define RGFW_IMPLEMENTATION
#include "RGFW.h"
int main() {
RGFW_window* win = RGFW_createWindow("name", RGFW_RECT(500, 500, 500, 500), (u64)0);
while running = 1;
for (running) {
while(RGFW_window_checkEvent(win)) {
if (win->event.type == RGFW_quit) {
running = 0;
break;
}
}
if (RGFW_isPressedI(win, RGFW_Escape))
break;
RGFW_window_swapBuffers(win);
glClearColor(0xFF, 0XFF, 0xFF, 0xFF);
glClear(GL_COLOR_BUFFER_BIT);
}
RGFW_window_close(win);
}
Example screenshots (basic and gl33)
More Info / RGFW Repo
A table provided in the header to show specific things RGFW supports and other information about RGFW compared to GLFW:
More information can be found on the RGFW rep and documentation can be found in the header itself, RGFW.h.
History
- 21st February, 2024: Initial version