At its core, OpenGL by Rexo Web is a specialized, optimized implementation of the OpenGL (Open Graphics Library) specification tailored for web environments. OpenGL itself is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. Typically, OpenGL communicates directly with the Graphics Processing Unit (GPU).
However, running OpenGL directly inside a browser sandbox has historically been challenging. Rexo Web solves this by acting as a lightweight abstraction layer. It translates OpenGL commands into efficient WebGL or WebGPU calls, but with a crucial twist: it leverages low-level browser APIs and multi-threading (via Web Workers) to bypass standard JavaScript bottlenecks.
In essence, OpenGL by Rexo Web allows developers to write classic, familiar OpenGL code (similar to desktop applications) and run it in a browser with near-native frame rates. opengl by rexo web
When OpenGL runs on a remote GPU server (e.g., cloud gaming):
This is how GeForce NOW / Stadia work. For "Rexo Web", you could implement a simple version using GStreamer + WebRTC. At its core, OpenGL by Rexo Web is
While WebGL is limited to OpenGL ES, OpenGL by Rexo Web supports a larger subset of desktop OpenGL 3.3 and 4.0 features, including:
Use GLM library.
#include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp>glm::mat4 model = glm::rotate(glm::mat4(1.0f), angle, glm::vec3(0.0f, 1.0f, 0.0f)); glm::mat4 view = glm::lookAt(glm::vec3(0,0,3), glm::vec3(0,0,0), glm::vec3(0,1,0)); glm::mat4 projection = glm::perspective(glm::radians(45.0f), 800.0f/600.0f, 0.1f, 100.0f);
GLuint mvpLoc = glGetUniformLocation(shader, "uMVP"); glUniformMatrix4fv(mvpLoc, 1, GL_FALSE, &(projection * view * model)[0][0]);This is how GeForce NOW / Stadia work
For web control, send mouse/touch events to update camera.
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh