Storm Engine
The storm engine is a simple 2D renderer designed for performance. It currently features an OpenGL 3.3 backend and supports Windows, Linux, ans Mac. The engine is experimental and can change at any time.
The engine compiles with nightly.
Example
This example will render a white square in about the center of the screen with text below it.
use crate::cgmath::*;
use storm::time::*;
use storm::*;
fn main() {
Engine::start(
WindowSettings {
title: String::from("Storm: Square"),
size: Vector2::new(1280, 1024),
resizable: true,
},
game,
);
}
fn game(mut engine: Engine) {
let mut clock = Clock::new(144);
let screen = engine.batch_create(&BatchSettings::default());
{
let mut sprites = Vec::new();
sprites.push(Sprite::default());
engine.sprite_set(&screen, &sprites);
}
{
let mut strings = Vec::new();
let mut text = Text::default();
text.set_string("Hello world!");
text.color = color::WHITE;
text.pos.y -= 50.0;
text.push(string);
engine.text_set(&screen, &strings);
}
let mut is_active = true;
while is_active {
while let Some(message) = engine.input_poll() {
match message {
InputMessage::CloseRequested => is_active = false,
InputMessage::KeyPressed(key) => match key {
KeyboardButton::Escape => is_active = false,
_ => {},
},
_ => {},
}
}
engine.window_commit();
clock.tick();
}
}