百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

RGFW

> 数据库
开源

一个轻量级的单头文件跨平台库,用于一般的窗口化操作

1.8K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个轻量级的单头文件跨平台库,用于一般的窗口化操作

Riley's General Framework for Windowing

RGFW is a focused general windowing framework for creating and handling windows, graphics contexts and windowing inputs with a minimalistic and easy to modify implementation.



Features

  • is primarly written in C99 in mind, but supports C++, Objective-C/C++ and zig-cc compilation

  • has a C89 compatible API

  • is a flexible and can be used in multiple ways to best fit your use case

  • is small compared to other windowing libraries

  • is a general framework and can be used for games, apps or tools

  • does only depend on system API libraries, Winapi, X11, Cocoa, etc NO external dependencies

  • does help you create a window with a graphics context (OpenGL, Vulkan, WebGPU, Metal, or DirectX) and manage the window and its events only with a few function calls

  • is customizable, you enable or disable features

  • does work with X11 (UNIX), Wayland (experimental) (LINUX), Cocoa (MacOS), Emscripten (WASM) and WinAPI (tested on windows XP, 10, 11, reactOS and has limited 9x support)

  • is multi-paradigm, with a flexible event system, including multiple ways of handling events (callbacks, queue, state lookups)

  • does include a large number of examples for learning RGFW

  • has direct support for multiple compilers, gcc, clang, zig-cc, msvc (cl.exe) and emscripten c compiler (emcc).

  • does not handle any rendering for you (other than creating your graphics context)

  • is not an OpenGL focused library, RGFW can be used with ANY graphics API

There is a Makefile including for compiling the examples. NOTE: WAYLAND=1 can be defined to compile for wayland. WAYLAND_X11=1 can be used instead if you want examples to fallback to X11 if a Wayland display is not found. This adds #define RGFW_WAYLAND in the implementation (or defines RGFW_WAYLAND AND RGFW_X11)

Included in the framework are helper functions for multiple rendering APIs OpenGL (Native, EGL, GLES), Vulkan, DirectX, Metal and WebGPU, you can also easily blit raw data directly onto the window with the RGFW_surface object using RGFW_window_blitSurface.

You must explicitly request these helper functions via, #define RGFW_OPENGL, #define RGFW_VULKAN, #define RGFW_DIRECTX, #define RGFW_WEBGPU.

Getting started

a very simple example

…
linux : gcc main.c -lX11 -lGL -lm -lXrandr
windows : gcc main.c -lopengl32 -lgdi32
macos : gcc main.c -framework Cocoa

other examples

You can find more examples here or run them in your browser with emscripten

Documentation

There is a lot of in-header-documentation, but more documentation can be found at https://colleagueriley.github.io/RGFW/docs/index.html If you wish to build the documentation yourself, there is also a Doxygen file attached.

Bindings

A list of bindings can be found on the RGFW wiki here

projects

A list of projects that use RGFW can be found on the RGFW wiki here

Contacts

  • email : [email protected]
  • discord : ColleagueRiley
  • discord server : https://discord.gg/pXVNgVVbvh
  • BlueSky https://bsky.app/profile/colleagueriley.bsky.social
  • Twitter/X : https://x.com/ColleagueRiley

Supporting RGFW

There is a RGFW wiki page about things you can do if you want to support the development of RGFW here.

License

RGFW uses the Zlib/libPNG license, this means you can use RGFW freely as long as you do not claim you wrote this software, mark altered versions as such and keep the license included with the header.

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cc99cocoacross-platformgraphics

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库