sky_renderer
sky_renderer is a minimalistic 2D graphics engine built in Rust with native bindings to OpenGL. Ultimately, the goal is to provide a robust platform for drawing 2D shapes and visualizing data in real-time.
This version provides low-level bindings to OpenGL and is not yet production-ready. Future versions will add support for additional drawing primitives such as lines, texts and other shapes, as well as a higher-level rendering API abstracting OpenGL.
🚧 Status
Because the APIs are evolving, please make sure to always use the latest release.
As of version 0.2.0 (this release), a higher-level API has been introduced. You can now create and render shapes without leveraging the low-level OpenGL APIs. For an example on how to use the higher-level APIs, refer to shapes in the examples folder:
extern crate sky_renderer;
use ;
use Renderable;
use RenderableShape;
use Rectangle;

Note that this is still a (very) early release: this version provides a limited set of bindings to OpenGL and is
not yet suitable for production use. Additional graphics2d primitives need to be implemented and the APIs may
continue to evolve.
📖 Docs
Wiki
Refer to the sky_renderer GitHub wiki, which will be updated soon.
📦 Examples
Refer to the examples provided in the sky_renderer GitHub repository. The examples will be updated as new features are added.
🐞 Issues
You can raise issues directly on Github.
🔧 Installation
Linux
Make sure you have all dependencies installed on your system (including a C/C++ compiler and CMake):
sudo apt-get install libgl1-mesa-dev
sudo apt install mesa-utils
sudo apt install libglfw3-dev
You can add sky_renderer as a dependency to your project. When building your project, cargo will first build (using CMake with your system's C/C++ compiler) a static library containing the sky_renderer ffi bindings to OpenGL (the ffi bindings can be found here)
Windows
Make sure you are using release 0.1.7 or later (there was no Windows support for earlier versions). Ensure you have Visual C/C++ and CMake installed on your system. Also use vcpkg to install glfw on your system:
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install glfw3
You must also update your system's environment variables:
-
Define the
VCPKG_LIB_PATHenvironment variable to point to vcpkg's lib folder (this is where glfw3.lib is installed, for exampleD:\GitHub\vcpkg\installed\x64-windows\lib) -
Update your system's
PATHenvironment variable to point to vcpkg's bin folder (this is where glfw3.dll is installed, for exampleD:\GitHub\vcpkg\installed\x64-windows\bin)
macOS
Ensure you have CMake and a C/C++ compiler installed on your system. Use Homebrew to install glfw on your system:
brew install glfw
brew info glfw
Once glfw is installed, the crate's build script will look for the glfw libraries under /opt/homebrew/lib