Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
WebSDKEntry.cpp File Reference

ESEngine Web SDK entry point with rendering support. More...

#include <emscripten.h>
#include <emscripten/bind.h>
#include <emscripten/html5.h>
#include "EngineContext.hpp"
#include "ActiveContext.hpp"
#include "RenderBinding.hpp"
#include "ResourceManagerBindings.hpp"
#include "RendererBindings.hpp"
#include "TestProbeBindings.hpp"
#include "UIBindings.hpp"
#include "BoundarySpan.hpp"
#include "ImmediateDrawBindings.hpp"
#include "GeometryBindings.hpp"
#include "AnimationBindings.hpp"
#include "MaterialBindings.hpp"
#include "../ui/UILayoutSystem.hpp"
#include "../ui/UIHitTestSystem.hpp"
#include "../ui/UIRenderOrderSystem.hpp"
#include "../ui/UISystem.hpp"
#include "../renderer/rhi/OpenGLHeaders.hpp"
#include "../renderer/rhi/GfxDevice.hpp"
#include "../renderer/frame/RenderContext.hpp"
#include "../renderer/frame/RenderFrame.hpp"
#include "../renderer/draw/ImmediateDraw.hpp"
#include "../renderer/draw/CustomGeometry.hpp"
#include "../resource/ResourceManager.hpp"
#include "../resource/ShaderParser.hpp"
#include "../ecs/TransformSystem.hpp"
#include "../core/World.hpp"
#include "../ecs/components/Velocity.hpp"
#include "../ecs/components/Camera.hpp"
#include "../ecs/components/UINode.hpp"
#include "../ecs/components/UIVisual.hpp"
#include "../ecs/components/RigidBody2D.hpp"
#include "../ecs/components/Collider2D.hpp"
#include "../ecs/components/ShapeRenderer.hpp"
#include "../animation/TweenSystem.hpp"
#include "../core/Log.hpp"
#include <glm/glm.hpp>
#include <cstdlib>
#include <cstring>
#include <cstddef>
#include <malloc.h>
Include dependency graph for WebSDKEntry.cpp:

Go to the source code of this file.

Namespaces

namespace  esengine

Macros

#define g_initialized   (ctx().state().initialized)
#define g_resourceManager   (ctx().tryGet<resource::ResourceManager>())
#define g_renderContext   (ctx().tryGet<RenderContext>())

Functions

static EngineContext & esengine::legacyCtx ()
static EstellaContext & esengine::ctx ()
f64 esengine::es_getMallocBytes ()
emscripten::val esengine::esshader_cookInfo (const std::string &source, const std::string &featuresCsv)
bool esengine::initRendererInternal (const char *canvasSelector)
bool esengine::initRendererWebGPU (const std::string &canvasSelector, u32 width, u32 height, bool readback, bool preferBGRA)
bool esengine::initRendererThreaded (bool preferGPU, const std::string &features, bool readback)
i32 esengine::renderThread_bootStatus ()
void esengine::renderThread_resizeSurface (u32 width, u32 height)
bool esengine::initRenderer ()
bool esengine::initRendererWithContext (int contextHandle)
void esengine::shutdownRenderer ()
resource::ResourceManager * esengine::getResourceManager ()
u32 esengine::deviceStatus ()
 The device's status (see GfxDeviceStatus). Live when no device exists yet.
std::string esengine::deviceLostReport ()
 The formatted loss report; empty while the device is live.
std::string esengine::deviceIdentity ()
 Who the device is, as backend|vendor|renderer|version.
bool esengine::provideReplacementDevice ()
 Hands the backend a replacement device the page acquired.
bool esengine::recoverDevice ()
 Rebuilds the device and everything it issued; see GfxDevice::recoverDevice.
void esengine::notifyDeviceLost (u32 reason, const std::string &message)
 Reports a loss the page observed.
double esengine::registryLayoutEpoch (ecs::Registry &r)
 EMSCRIPTEN_BINDINGS (esengine_layout_epoch)
 EMSCRIPTEN_BINDINGS (esengine_context)
 EMSCRIPTEN_BINDINGS (esengine_renderer)
 EMSCRIPTEN_BINDINGS (esengine_ui_systems)
int main ()

Variables

static constexpr const char * esengine::kEstellaBuildProvenance
static std::atomic< int > esengine::threadedBoot {0}

Detailed Description

ESEngine Web SDK entry point with rendering support.

Author
ESEngine Team
Date
2026

Definition in file WebSDKEntry.cpp.

Macro Definition Documentation

◆ g_initialized

#define g_initialized   (ctx().state().initialized)

Definition at line 88 of file WebSDKEntry.cpp.

◆ g_renderContext

#define g_renderContext   (ctx().tryGet<RenderContext>())

Definition at line 90 of file WebSDKEntry.cpp.

◆ g_resourceManager

#define g_resourceManager   (ctx().tryGet<resource::ResourceManager>())

Definition at line 89 of file WebSDKEntry.cpp.

Function Documentation

◆ EMSCRIPTEN_BINDINGS() [1/4]

◆ EMSCRIPTEN_BINDINGS() [2/4]

EMSCRIPTEN_BINDINGS ( esengine_layout_epoch )

Definition at line 536 of file WebSDKEntry.cpp.

References esengine::registryLayoutEpoch().

◆ EMSCRIPTEN_BINDINGS() [3/4]

◆ EMSCRIPTEN_BINDINGS() [4/4]

◆ main()

int main ( )

Definition at line 1072 of file WebSDKEntry.cpp.