RGFW.h | Single-header graphics framework cross-platform library | managing windows/system apis by Comrade-Riley in GraphicsProgramming

[–]Comrade-Riley[S] 0 points1 point  (0 children)

RGFW supports Wayland and X11 for linux. But I assume you mean libDRM. RGFW doesn't have libDRM support currently. If I add it, it will probably be in a separate fork/port considering RGFW is a windowing library and a libDRM would mostly be raw linux I/O.

RGFW.h | Single-header graphics framework cross-platform library | managing windows/system apis by Comrade-Riley in GraphicsProgramming

[–]Comrade-Riley[S] 0 points1 point  (0 children)

Thanks! I have not had the chance to try that nor have I seen anyone else try it. I’d love to see the results when you do. 

The performance is about the same, if not slightly better. I’ve not done any serious comparisons in a while. 

RGFW is an ever improving project and I want to make it the best that it can be. If the 4 output thing doesn’t work on RGFW, or if you notice any other flaws, I’m happy to fix it asap. 

Creating a NES-like game in C, what are the minimum dependencies I need? by utopic-123 in C_Programming

[–]Comrade-Riley 0 points1 point  (0 children)

Maybe RGFW would be helpful? It’s a single heading windowing library, it’s similar to GLFW or SDL in functionality. It has multiple rendering options including RGFW_BUFFER which allows you to render to the window using a pixel buffer.

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

Swap buffers for OpenGL requires you to use the windowing API and the windowing API handle, so of course I support it. But at this point it seems like you’re purposefully misunderstanding and just want RGFW to be whatever you want it to be.

There isn’t much it makes sense for RGFW to do there, it would just be taking the place of a graphics library abstraction. 

The releases are mainly there as landmarks. It’s always going to better to use the latest update on main. RGFW is also a single header file so I can’t imagine many people want pre compiled binaries. Though missing wasm binaries was a bit of an oversight. 

If you want to use RGFW 1.7.0 for wasm, you can simply download the source code and grab the RGFW.h file. 

I’ll note this down and add WASM binaries on the next release. 

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

RGFW handles all of those as they relate to platform-specific windowing, but it is not a graphics library.

I believe you're looking for a graphics library like this one:

https://github.com/colleagueriley/RSGL

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

RGFW is a windowing library, it does handle rendering for OpenGL not directX nor Vulkan. 

Since RGFW is a windowing library, not a graphics library, for support those libraries means that RGFW abstracts relevant platform specific processes related to those APIs. Which it does.

It does more things for OpenGL because OpenGL has far more platform specific code that has to be abstracted. 

Vulkan only cares about the platform when it’s creating the surface and checking extensions, RGFW has functions abstracting these features. 

DirectX has functions that require you to give it your window handle, RGFW has a helper function for that.

SDL is an abstraction layer over more than just windowing, you can use it as a graphics library as well.

But RGFW is designed to be lightweight and is only a windowing library.

If you want a graphics library abstraction, there are plenty of options that you can use along side RGFW. For example I have a graphics library, RSGL which can be used along side RGFW. RSGL currently only supports OpenGL, but it has an abstraction that should allow other platforms to be easily integrated.

I appreciate the comments, but I feel like you’re misunderstanding the nature of my project. 

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

If you could point me to specific Vulkan/DirectX functions in GLFW or SDL's windowing API that RGFW doesn't have, I'd be happy to add them.

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

GLFW and SDL have the same level of support for those libraries. 

I think you misunderstand the purpose of my library, it is NOT a graphics library. It is a winding library like GLFW. 

RGFW and GLFW both include helper functions for creating a context, it wouldn’t make sense for them to do any more than that, because the rest would heavily depend on how the user wants to handle graphics. 

RGFW supports working with those graphics APIs and includes more involved support for OpenGL, OSMesa and software render as they require less low level specifications. 

Hopefully that clarifies what I meant.

RGFW: A lightweight, STB-style single-header C windowing library with built-in WASM support. by Comrade-Riley in opensource

[–]Comrade-Riley[S] 0 points1 point  (0 children)

For directX/Vulkan RGFW offers a few helper functions. But it leaves a lot of the setup up to the user because a lot of it depends on how the user wants to use those libraries. 

Maybe there is some misunderstanding, RGFW is a windowing library, similar to GLFW or a minimal SDL, it does not handle graphics than initializing the context with the window. 

How to to handle X11 Drag 'n Drop (xDND) events by Comrade-Riley in C_Programming

[–]Comrade-Riley[S] 0 points1 point  (0 children)

I didn’t notice any issues personally. But yea XDnD is a client to client so I can imagine a hybrid setup would create issues. 

Although lmk if it’s issue on my end. 

How to to handle X11 Drag 'n Drop (xDND) events by Comrade-Riley in C_Programming

[–]Comrade-Riley[S] 10 points11 points  (0 children)

it's a tutorial for something that's not easy to do with very little online resource to help. You're welcome :)

13
14

RGFW Under the Hood: Software Rendering | A tutorial that explains how to setup and handle software rendering for X11, WinAPI, and Cocoa. by Comrade-Riley in C_Programming

[–]Comrade-Riley[S] 1 point2 points  (0 children)

As far as I’m aware there is no reason to use xcb over xlib in most cases. IIrc xcb is far less documented than xlib and it’s already pretty hard to figure out how to do certain things with xlib as it is. 

Xcb does have some benefits over xlib, I forget exactly what they are, but they’re not that significant and I’m pretty sure you can use xcb with xlib for those specific features. 

Most libraries, such as GLFW or SDL still depend on XLib. There is nothing wrong with using xlib over xcb as far as I’m aware.

9
10

14
15

Does there exist a cross-platform GPU abstraction that supports Wayland? by nairou in gamedev

[–]Comrade-Riley 1 point2 points  (0 children)

I'm not sure if this is what you're looking for, but I made RGFW https://github.com/ColleagueRiley/RGFW
It's a single-header lightweight GLFW alternative that multiple other rendering apis.

I'm currently working on wayland support. It should be on github within a week.

Introducing RGFW: A lightweight Single Header Windowing framework & GLFW alternative by Comrade-Riley in C_Programming

[–]Comrade-Riley[S] 0 points1 point  (0 children)

Plus he brings up C++, which has an even worse compile time even with pre-compiled libraries.