All Projects → msharov → Gleri

msharov / Gleri

Licence: mit
Network protocol, service, and API for using OpenGL remotely.

Projects that are alternatives of or similar to Gleri

Nx Libs
nx-libs
Stars: ✭ 89 (+456.25%)
Mutual labels:  remote-desktop, x11
Libagar
Cross-Platform GUI Toolkit (stable)
Stars: ✭ 212 (+1225%)
Mutual labels:  opengl, x11
Wayst
A simple terminal emulator
Stars: ✭ 117 (+631.25%)
Mutual labels:  opengl, x11
Cute headers
Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
Stars: ✭ 3,274 (+20362.5%)
Mutual labels:  opengl, networking
Glmark2
glmark2 is an OpenGL 2.0 and ES 2.0 benchmark
Stars: ✭ 199 (+1143.75%)
Mutual labels:  opengl, x11
Open Builder
Open "Minecraft-like" game with multiplayer support and Lua scripting support for the both client and server
Stars: ✭ 569 (+3456.25%)
Mutual labels:  opengl, networking
Swift Nio
Event-driven network application framework for high performance protocol servers & clients, non-blocking.
Stars: ✭ 6,777 (+42256.25%)
Mutual labels:  networking
Sv3
A userspace software-switch including Intel 82599 10G NIC driver
Stars: ✭ 6 (-62.5%)
Mutual labels:  networking
Pyopencl
OpenCL integration for Python, plus shiny features
Stars: ✭ 790 (+4837.5%)
Mutual labels:  opengl
Com.unity.multiplayer.mlapi
A game networking framework built for the Unity Engine to abstract game networking concepts.
Stars: ✭ 781 (+4781.25%)
Mutual labels:  networking
Nya
[WIP] Game Engine written in Crystal
Stars: ✭ 16 (+0%)
Mutual labels:  opengl
Yage
Simple game engine, written in C++
Stars: ✭ 7 (-56.25%)
Mutual labels:  opengl
Bonzomatic
Live shader coding tool and Shader Showdown workhorse
Stars: ✭ 829 (+5081.25%)
Mutual labels:  opengl
Kube Ovn
A Kubernetes Network Fabric for Enterprises that is Rich in Functions and Easy in Operations
Stars: ✭ 798 (+4887.5%)
Mutual labels:  networking
Nexer
Content based network multiplexer or redirector made with love and Go
Stars: ✭ 7 (-56.25%)
Mutual labels:  networking
Mongo Cxx Driver
C++ Driver for MongoDB
Stars: ✭ 792 (+4850%)
Mutual labels:  networking
P2p
Practice project to demonstrate p2p file sharing.
Stars: ✭ 16 (+0%)
Mutual labels:  networking
Bmon
bandwidth monitor and rate estimator
Stars: ✭ 787 (+4818.75%)
Mutual labels:  networking
Sfml
Simple and Fast Multimedia Library
Stars: ✭ 7,316 (+45625%)
Mutual labels:  opengl
Pandoc Latex Tip
A pandoc filter for adding tip in LaTeX
Stars: ✭ 7 (-56.25%)
Mutual labels:  x11

=============================================================================

                   ####  #     ####  ####  ####
                   #     #     #     #  #   ##
                   #     #     ##    ####   ##
                   #  #  #     #     # #    ##
                   ####  ####  ####  #  #  ####

=============================================================================

  1. OpenGL Blues

If you are writing a graphical application on Linux and want it to take advantage of GPU hardware that every computer has these days, your only option is to use OpenGL, because that is the only API exposed by the drivers. Unfortunately, using OpenGL is not without its problems.

The most acute problem is inability to run your applications remotely. X and Unix in general have a long history of allowing remote use, a very useful capability in many circumstances, but while there is an X extension (GLX) allowing OpenGL remoting, it is restricted to the ancient version 1.2 API that does not support essential capabilities such as vertex buffer objects. Furthermore, GLX is at this time being deprecated in favor of EGL, and will be replaced by it in some near future. Even worse, the entire X11 protocol is in danger of disappearing and being replaced by Wayland, which is not designed for remote use.

Another problem is the libraritis infection you get by having to link to the OpenGL shared library. No static library is available for this, so no statically linked executables can be created. The OpenGL library is huge and contains a lot of low-level tie-ins to the kernel driver guts, resulting in bloat and instability. Crashing your application may cause a kernel panic, just like in good old Windows 3.1, which likewise made the mistake of putting driver guts into user application process space. The driver initialization sequence can also be slow (~.3s), and must be done every time you start your application.

Finally, one must mention the problem of debugging an OpenGL application. If you happen to hit a breakpoint at some location unexpected by the driver developers, sometimes you would not be able to switch to the debugger because you've just trapped something critical in the driver and stopped all X rendering. Often, this situation requires a hard power cycle. After a while you give up trying the debugger at all.

Now, wouldn't it be nice if there was a network protocol letting us write applications that use OpenGL remotely, without linking to the entire graphics driver? Well, GLERI is it.

  1. GLERI

GLERI is a library implementing an OpenGL functionality service and a protocol for communicating with it. This allows creation of executables that do not have to link with OpenGL libraries, have direct access to the DRI devices, or require a local X11 connection.

The service is called gleris and can be used either standalone, or be launched individually by libgleri-using applications. By default, only the local $HOME/.config/gleris.socket is created. If you want a TCP socket, run gleris -t, which will make it listen on localhost port 6540+display. Alternatively, you can use systemd socket activation to create appropriate sockets and have them passed to gleris automatically.

You can then forward that port with ssh to wherever with the ssh -R command. When you do this, you'll need to also copy the xauth token and set DISPLAY (or GLERI_DISPLAY if you are already forwarding X with ssh -X) to match it on the server. gleris will load the xauth token for the display it is running on, and can not read the xauth token generated by ssh -X, because that token is only used inside ssh. So you need to set the display variable to the same value gleris sees.

The library is libgleri.a, See the test/ program for a usage example.

The target platform is a POSIX compliant architecture, such as Linux or BSD. Windows and embedded platforms are absolutely not supported. Other minimum requirements are Linux kernel 2.6.28, GCC 4.6 or clang++ 3.2. Wayland will likely be supported in the future when it supports OpenGL (currently it only has OpenGL ES support). Required libraries are zlib, libpng, and libjpeg.

OpenGL 3.3+ is required. The current open source drivers support it on Intel hardware since Mesa 10.1 and radeon and noveau since 10.2. Binary drivers, however, still deliver the best results for nVidia.

To build: ./configure && make To install: make install Test program: make check Documentation: docs/ Tutorials: tut/

  1. Acknowledgements

gleris embeds the Terminus font for default text output test program princess spritesheet is from opengameart.org

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].