Frontends

The user-facing entry points: a windowed application with GLFW, or a headless frontend for tests and compute-only workloads.

class GlfwFrontend

Public Functions

GlfwFrontend()

User facing class.

class HeadlessFrontend

Public Functions

HeadlessFrontend()

User facing class.

Cameras

The camera uniform buffer has the type CameraUboType, a UniformBufferObject<CameraMVP>.

class InterfaceCamera

Interface for cameras that the engine updates every frame.

KlartraumEngine::setInterfaceCamera() calls initialize() once. Every frame, KlartraumEngine::step() passes the queued input events to onEvent() and then calls update(), which writes the camera matrices into the data of the camera uniform buffer.

Subclassed by klartraum::InterfaceCameraOrbit

class InterfaceCameraOrbit : public klartraum::InterfaceCamera
struct CameraMVP

Contents of the camera uniform buffer (CameraUboType): model, view and projection matrices and the camera position, in std140 layout.

Input events

class Event

Base class of the input events that a frontend queues in KlartraumEngine::getEventQueue().

KlartraumEngine::step() passes them to the InterfaceCamera.

Subclassed by klartraum::EventKey, klartraum::EventMouseButton, klartraum::EventMouseMove, klartraum::EventMouseScroll

class EventMouseMove : public klartraum::Event

The mouse cursor moved: position (x, y) and movement (dx, dy) since the last event, in screen coordinates.

class EventMouseButton : public klartraum::Event

A mouse button was pressed or released.

class EventMouseScroll : public klartraum::Event

The mouse wheel or touchpad scrolled; (x, y) is the offset since the last frame.

class EventKey : public klartraum::Event

A key was pressed or released.