Crate blue_engine

source ·
Expand description

Blue Engine

Blue Engine is an easy to use, portable, and extendable/customizable graphics engine. Here lives the documentation for the engine.


The setup and installation details live in the project’s guide. A basic program in Blue Engine is as follow:


use blue_engine::{
    header::{ Engine, ObjectSettings },

fn main() {
    // initialize the engine
    let mut engine = Engine::new().expect("engine couldn't be initialized");

    // create a triangle
    triangle("my triangle", ObjectSettings::default(), &mut engine.renderer, &mut engine.objects).unwrap();

   // run the engine
       .update_loop(move |_, _, _, _, _, _| {})
       .expect("Error during update loop");


This crate is the core of the engine, but there is also utilities crate which have a lot of utilities for the engine such as lighting, physics, etc.




  • Container for the camera feature. The settings here are needed for algebra equations needed for camera vision and movement. Please leave it to the renderer to handle
  • The engine is the main starting point of using the Blue Engine. Everything that runs on Blue Engine will be under this struct. The structure of engine is monolithic, but the underlying data and the way it works is not. It gives a set of default data to work with, but also allow you to go beyond that and work as low level as you wish to.
  • Instance buffer data storage
  • Instance buffer data that is sent to GPU
  • Objects make it easier to work with Blue Engine, it automates most of work needed for creating 3D objects and showing them on screen. A range of default objects are available as well as ability to customize each of them and even create your own! You can also customize almost everything there is about them!
  • Extra settings to customize objects on time of creation
  • Container for pipeline values. Each pipeline takes only 1 vertex shader, 1 fragment shader, 1 texture data, and optionally a vector of uniform data.
  • Will contain all details about a vertex and will be sent to GPU
  • Container for vertex and index buffer
  • Descriptor and settings for a window.




  • This function helps in converting pixel value to the value that is between -1 and +1