Core
Application lifecycle, logging, and fundamental types.
Application- Base class for gamesApplicationConfig- Startup configurationES_LOG_*- Logging macros
The ESEngine API is organized into several modules. This page provides an overview; detailed documentation is available in the Doxygen-generated reference.
Core
Application lifecycle, logging, and fundamental types.
Application - Base class for gamesApplicationConfig - Startup configurationES_LOG_* - Logging macrosECS
Entity-Component-System for game objects.
Registry - Entity/component containerEntity - Unique identifier typeView - Query iteratorRenderer
WebGL-based graphics.
Renderer - Drawing APITexture - Image loadingShader - Custom shadersPlatform
OS and browser abstraction.
Platform - Window/contextInput - Keyboard/mouse/touchThe main entry point for games. Inherit and override lifecycle methods.
class Application {public: Application(const ApplicationConfig& config = {}); void run(); void quit();
protected: virtual void onInit(); virtual void onUpdate(f32 deltaTime); virtual void onRender(); virtual void onShutdown();
virtual void onTouch(TouchType type, const TouchPoint& point); virtual void onKey(KeyCode key, bool pressed); virtual void onResize(u32 width, u32 height);
Platform& getPlatform(); ecs::Registry& getRegistry();};Central ECS container for entities and components.
class Registry {public: // Entity management Entity create(); void destroy(Entity entity); bool valid(Entity entity) const;
// Component management template<typename T, typename... Args> T& emplace(Entity entity, Args&&... args);
template<typename T> T& get(Entity entity);
template<typename T> bool has(Entity entity) const;
// Queries template<typename... Components> View<Components...> view();};Iterator for querying entities with specific components.
template<typename... Components>class View {public: // Range-based for loop iterator begin(); iterator end();
// Structured bindings iteration auto each();
// Direct component access template<typename T> T& get(Entity entity);};ESEngine uses consistent type aliases throughout the codebase:
namespace esengine { using u8 = uint8_t; using u16 = uint16_t; using u32 = uint32_t; using u64 = uint64_t;
using i8 = int8_t; using i16 = int16_t; using i32 = int32_t; using i64 = int64_t;
using f32 = float; using f64 = double;
using usize = size_t;
template<typename T> using Unique = std::unique_ptr<T>;
template<typename T> using Shared = std::shared_ptr<T>;}ES_LOG_TRACE("Detailed debug info: {}", value);ES_LOG_DEBUG("Debug message");ES_LOG_INFO("General information");ES_LOG_WARN("Warning message");ES_LOG_ERROR("Error occurred: {}", errorMsg);ES_ASSERT(condition, "Message if condition is false");ES_VERIFY(ptr != nullptr, "Pointer must not be null");For complete API documentation with all parameters, return types, and examples, see the Doxygen-generated reference.
Open API Documentation →
The Doxygen documentation includes: