Skip to content

itslebi/GDGameLights

Repository files navigation

GDGamepadLights

OpenRGB GDExtension Integration for I/O Lighting Control

This project integrates OpenRGB into a Godot GDExtension to enable direct control of RGB lighting on supported gamepads and other I/O devices. It is built using the OpenRGB C++ SDK and adapted to work with a modified dependency stack based on CppUtils and CppUtils-Network.

Several patches where made to openRGB. Files ProtocolCommon.hpp, DeviceInfo.cpp, ProtocolMessages.cpp and NetAddress.cpp where updated to use the new BinaryStream.hpp from the extarnal libraries required. Patches are identified with comments.


Index


Features

  • Full integration with OpenRGB for I/O devices lighting control.
  • Supports RGB gamepads and compatible hardware.
  • Uses OpenRGB C++ SDK for communication with OpenRGB server.
  • Updated to work with modern CppUtils networking and utility libraries.

How to Use

Prerequisites

  • Godot 4.5
    ⚠️ This extension was tested with Godot 4.5. It may work with other 4.x versions, but compatibility is not guaranteed.

1. Download the Latest Release

You can find the latest release for Windows and Linux in Releases.
MacOS users must build the extension manually using the developer build instructions.

2. Add it to your project

Unzip the release archive and place the resulting folder into your main Godot project directory.

3. Download Open RGB

⚠️Your Players must follow steps 3 and 4 in order for it to be active during gameplay!

Go to OpenRGB official website and download OpenRGB for your OS.

4. Start OpenRGB Server

⚠️Each time you want to use GDGameLights you need to start the OpenRGB server on the correct port!

Open OpenRGB's app, navigate to SDK server and start the server on the port that you are using on your project! Default port for the extension is 6742. image

5. Done

You can now control supported RGB gamepads through OpenRGB from your Godot project.


Developer Build

Prerequisites

  • Godot 4.5
    ⚠️ This extension was tested with Godot 4.5. It may work with other 4.x versions, but compatibility is not guaranteed.
  • C++ build environment (GCC / Clang / MSVC)
  • Python
  • SCons (used for building)

⚠️ Godot CPP is required and included in the project source. ⚠️ OpenRGB SDK and CppUtils dependencies are included in modified form. Original sources used: OpenRGB C++ SDK, CppUtils-Essential, CppUtils-Network

1. Clone the Repository

git clone https://github.com/itslebi/GDGamepadLights
cd GDGamepadLights

2. Building

Run the following command inside the main GDGamepadLights folder:

scons target=template_release

⚠️ If OpenRGB SDK or dependencies fail to build, refer to their respective documentation.

⚙️ This will build the GDExtension and output the compiled binary (.dll or .so) in the bin/ directory.

Additionally, the following definition is required in SConstruct:

The provided SConstruct already includes it.

env.Append(CPPDEFINES=[('critical_error', 'CRITICAL_ERROR')])

This ensures compatibility with legacy CppUtils-Essential calls.


3. Testing

⚠️ Verify that the compiled binary is correctly referenced in the .gdextension file.

Use the included demo project:

  • Open the project in Godot
  • Ensure OpenRGB is running with SDK enabled
  • Test device lighting control via supported gamepads

License

GDGamepadLights is open source and licensed under the MIT License. You are free to use, modify, and distribute this software as long as the original license and copyright notice are included.

Please note:


Credits

This extension was made by me alone but it would not be possible without the below open source projects!

© 2025 @itslebi — Contributions welcome!

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors