![header](header_logo.png)
Features:
- Compatible with WebAssembly. One build for every platforms!
- Fast & simple.
- No dependencies: everything is fetched using cmake FetchContent.
Ready to start?
Open a new Window:
A window. You can draw objects on the window.
The main loop:
void loop() {
[...]
window.Display();
}
const glm::vec4 Black
Black.
Images
Load textures:
Display images:
ball_sprite.SetPosition({200,200});
window.Draw(ball_sprite);
Text
Load font:
auto font_arial =
smk::Font(
"./arial.ttf", 32);
Display text:
auto text =
smk::Text(font_arial,
"hello world");
text.SetPosition({200,200});
window.Draw(text);
A class for displaying text.
Sound
Load sound:
auto sound_buffer = smk:SoundBuffer("./boing.ogg");
Play sound:
sound.Play();
Represent a sound being played.
Transform the view
view.SetCenter({200, 200});
view.SetSize(320,240);
window.SetView(view);
Examples:
Games made using SMK