Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelknap/x11-desktop-cube-example
A simple example of a _NET_WM_WINDOW_TYPE_DESKTOP window with an OpenGL context.
https://github.com/michaelknap/x11-desktop-cube-example
c opengl x11
Last synced: 7 days ago
JSON representation
A simple example of a _NET_WM_WINDOW_TYPE_DESKTOP window with an OpenGL context.
- Host: GitHub
- URL: https://github.com/michaelknap/x11-desktop-cube-example
- Owner: michaelknap
- License: mit
- Created: 2023-11-03T23:16:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-29T09:48:18.000Z (about 1 year ago)
- Last Synced: 2023-11-29T10:50:59.385Z (about 1 year ago)
- Topics: c, opengl, x11
- Language: C
- Homepage:
- Size: 2.82 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# X11 Desktop Cube with OpenGL
## Description
This is a simple example of an X11 `_NET_WM_WINDOW_TYPE_DESKTOP` window with an OpenGL context. It creates an effect of drawing graphics directly onto the desktop. It works on **X11** and **Wayland** (via *XWayland* compatibility layer).
## Demo
![](screenshots/24fps.gif)
## Dependencies
Ensure you have the `OpenGL development libraries` installed. These may be provided by Mesa or by proprietary drivers, such as those from NVIDIA or AMD. In many cases, these libraries will already be installed on your system.
#### Arch Linux/Manjaro:
```bash
sudo pacman -S glew libx11 libxinerama
```
#### Debian/Ubuntu:
```bash
sudo apt-get install libglew-dev libx11-dev libxinerama-dev
```
#### Fedora:
```bash
sudo dnf install glew-devel libX11-devel libXinerama-devel
```## Compilation
Use the provided `Makefile` to build the project and optionally install it (installation assumes you are running systemd):
```bash
git clone https://github.com/michaelknap/x11-desktop-cube-example
cd x11-desktop-cube-example
make
./build/desktop_cube
make install (optional install)
# If systemd:
systemctl --user start desktop_cube.service # OR
systemctl --user enable desktop_cube.service
```## Note on OpenGL Usage
For the sake of simplicity and brevity, this demo utilizes the fixed-function pipeline elements of OpenGL. Those looking to adapt or expand upon this code might consider updating to a more modern, shader-based approach.
## Known Limitations
- While the demo should work with basic multi-screen setups, it might not render correctly in configurations where monitors are stacked or vary in size.
- On systems without dedicated GPU, this app may cause higher CPU usage.## License
This project is licensed under the [MIT License](LICENSE).