Skip to content

Latest commit

 

History

78 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tela

C++ multimedia and game-development library. Windowing, 2D rendering, and input via a pluggable backend system — no SDL or other intermediary.

Current: Linux · Wayland · OpenGL/EGL
Planned: Windows, X11, Vulkan

Dependencies

# Debian/Ubuntu — Wayland + OpenGL backend
sudo apt install libwayland-dev libdecor-0-dev wayland-protocols \
                 libgl-dev libegl-dev libepoxy-dev

Build

make          # builds libtela.a
make examples # builds libtela.a + examples

CMake directly:

cmake -S . -B build -DBUILD_EXAMPLES=ON
cmake --build build --parallel

Backend/renderer selection:

CMake option Values Default
PROJECT_PLATFORM linux linux
PROJECT_BACKEND wayland wayland
PROJECT_RENDERER opengl opengl

Usage

#include <tela/app.hpp>
#include <tela/input.hpp>

class MyScene : public tela::Scene {
public:
    MyScene() { add_child(player_); }

private:
    Player player_;
};

int main() {
    tela::App app({ .width = 800, .height = 600, .title = "My Game" });
    app.run<MyScene>();
}

Node Types

Type Purpose
Node Base; override process(float) and draw(Renderer&)
Scene Root of the tree; owned by App
Timer Fires a callback after a duration; start() / stop()
Node2D Positioned node with set_position() / size() / set_rotation()
Sprite2D Renders a texture; constructed from a ResourcePath or a Texture2D

Assets resolve via tela::Resources::path("assets/foo.png") relative to the binary. Input goes through the static tela::Input API; see examples/input.

Examples

make examples

sprite2d and input under examples/, built to build/examples/<name>/<name>.

About

C++ multimedia and game-development library. Node-based scene system.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages