59 f32 skyIntensity,
bool showSky);
91#ifdef ES_ENABLE_BITMAP_TEXT
99 f32 minX,
f32 minY,
f32 maxX,
f32 maxY, uintptr_t outVisiblePtr);
103 uintptr_t verticesPtr,
i32 vertexCount,
104 uintptr_t indicesPtr,
i32 indexCount,
105 u32 textureId,
i32 blendMode,
106 u32 entity,
f32 skelScale,
bool flipX,
bool flipY,
111 uintptr_t verticesPtr,
i32 vertexCount,
112 uintptr_t indicesPtr,
i32 indexCount,
113 u32 textureId,
i32 blendMode,
114 u32 entity,
f32 skelScale,
bool flipX,
bool flipY,
115 i32 layer,
f32 depth,
u32 materialId,
bool premultipliedColor
118 uintptr_t verticesPtr,
i32 vertexCount,
119 uintptr_t indicesPtr,
i32 indexCount,
120 u32 textureId, uintptr_t transformPtr,
136 u32 entity, uintptr_t verticesPtr,
i32 vertexCount,
137 uintptr_t indicesPtr,
i32 indexCount,
u32 pageId,
i32 glyphMode
153 uintptr_t posUvPtr,
u32 vertexCount,
155 uintptr_t indicesPtr,
u32 indexCount
161 uintptr_t vertexPtr,
u32 vertexBytes,
162 uintptr_t indexPtr,
u32 indexCount,
165 uintptr_t bindPtr,
u32 bindFloats,
166 uintptr_t morphPtr,
u32 morphFloats,
167 u32 morphTargets,
u32 morphNormals);
173 uintptr_t channelsPtr,
u32 channelCount,
u32 vertexStride,
174 uintptr_t vertexPtr,
u32 vertexBytes,
175 uintptr_t indexPtr,
u32 indexCount,
178 uintptr_t bindPtr,
u32 bindFloats,
179 uintptr_t morphPtr,
u32 morphFloats,
180 u32 morphTargets,
u32 morphNormals);
200 f32 maxRange,
u32 columns);
241#ifdef ES_ENABLE_PARTICLES
246#ifdef ES_ENABLE_PARTICLES
248u32 particle_collisionQueryCount();
250uintptr_t particle_collisionQueries();
251u32 particle_collisionEventCount();
253uintptr_t particle_collisionEvents();
254u32 particle_collisionStatsCount();
256uintptr_t particle_collisionStats();
257void particle_collisionResolve(
ecs::Registry& registry, uintptr_t ptr,
u32 count);
258void particle_collisionSetBudget(
u32 queries,
u32 events,
bool debug);
266u32 particle_getAliveCount(
u32 entity);
267void particle_set_color_lut(
u32 entity, uintptr_t ptr,
i32 count);
268void particle_set_size_lut(
u32 entity, uintptr_t ptr,
i32 count);
270void particle_set_speed_lut(
u32 entity, uintptr_t ptr,
i32 count);
272void particle_set_bursts(
u32 entity, uintptr_t ptr,
i32 count);
312emscripten::val renderer_getLiveObjects();
315emscripten::val meshRenderer_localBounds(
ecs::Registry& registry,
u32 entity);
513 uintptr_t verticesPtr,
i32 vertexCount,
514 uintptr_t indicesPtr,
i32 indexCount,
515 u32 textureId,
i32 blendMode, uintptr_t transformPtr,
519 uintptr_t verticesPtr,
i32 vertexCount,
520 uintptr_t indicesPtr,
i32 indexCount,
521 u32 textureId,
i32 blendMode, uintptr_t transformPtr,
522 i32 layer,
f32 depth,
u32 materialId,
bool premultipliedColor);
546emscripten::val registry_getCanvasEntities(
ecs::Registry& registry);
547emscripten::val registry_getCameraEntities(
ecs::Registry& registry);
Core type definitions and utilities for ESEngine.
Central container for all entities and components.
u32 renderer_queueMaterialBake(u32 material, u32 shader, u32 target, u32 x, u32 y, u32 w, u32 h, f32 a0, f32 a1, f32 a2, f32 a3, f32 b0, f32 b1, f32 b2, f32 b3)
void renderer_setImpostorAtlas(u32 entity, u32 texture, u32 frames)
Hand entity's Impostor the atlas it draws from: texture holds frames x frames pictures.
void renderThread_flush()
void renderer_releaseTarget(u32 handle)
u32 renderer_getPreviewSize()
u32 renderer_getSkeletalPreviewSize(u32 preview)
void engine_setRandomSeed(u32 seed)
f32 renderer_getGpuTimeMs()
u32 mesh_createFromChannels(uintptr_t channelsPtr, u32 channelCount, u32 vertexStride, uintptr_t vertexPtr, u32 vertexBytes, uintptr_t indexPtr, u32 indexCount, f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ, uintptr_t bindPtr, u32 bindFloats, uintptr_t morphPtr, u32 morphFloats, u32 morphTargets, u32 morphNormals)
Geometry from an .esmesh channel table; returns its handle, 0 on failure.
void renderer_setTargetPoolIdleBudget(u32 megabytes)
void renderer_setViewId(u32 view)
void renderer_setAsyncComputeEnabled(bool enabled)
void meshInstances_set(ecs::Registry ®istry, u32 entity, uintptr_t dataPtr, u32 count)
The placements of a MeshInstances: sixteen f32 an instance (see the component). Empty clears the set.
std::int32_t i32
Signed 32-bit integer.
void renderer_setProbeVolumeOverride(u32 entity, u32 volumeHandle)
void renderer_setDepthPrepass(bool on)
i32 renderer_retainedTextStale(ecs::Registry ®istry, uintptr_t outPtr, i32 capacity)
The entities whose retained text no longer matches the world, written to outPtr as u32s.
u32 renderer_getSkeletal()
u32 renderer_getSnapshotHeight()
u32 gl_checkErrors(const std::string &context)
std::string renderer_getPendingProgramLabels()
What each program still compiling in the background is, one per line: its id and what it was made for...
bool renderer_takeFrameCapture(u32 handle, uintptr_t dest, u32 destSize)
void renderer_setOcclusionGridSize(u32 size)
u32 renderer_getCapturedEntityCount()
u32 probe_volume_create(i32 resX, i32 resY, i32 resZ, uintptr_t shPtr)
Registers a grid of baked irradiance — an environment sampled at points.
void springbone_release(ecs::Registry ®istry, u32 entity)
bool renderer_takeProbeCapture(uintptr_t dst, u32 bytes)
uintptr_t renderer_getSnapshotPtr()
void renderer_setRetainedTextCollected(bool collected)
The frame draws the retained labels in its own collects from now on, and renderer_retainedTextSubmit ...
bool renderer_snapshotMatchesCapture()
void environment_setSun(u32 environmentHandle, uintptr_t skyShPtr, f32 dx, f32 dy, f32 dz, f32 r, f32 g, f32 b)
Gives an environment the sun its importer separated from the sky.
f64 renderer_getSkinCacheStat(i32 which)
The skin cache's state: 0 active, 1 meshes held, 2 bytes held, 3 refused this frame by the budget,...
void renderer_setProbesPerPixel(bool on)
Whether meshes read their probe volume per pixel (true, the default) or per object,...
void renderer_setPlanarReflectionQuality(f32 scale, u32 maxSize, f32 updatesPerSecond, bool capAuthored)
uintptr_t renderer_getCapturedFrameData()
i32 renderer_materialBakeState(u32 ticket)
0 waiting, 1 drawn, -1 not drawable; a drawn or failed ticket is forgotten once asked.
i32 renderer_submitSkeletalPreviewBatch(u32 preview, uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 textureId, i32 blendMode, uintptr_t transformPtr, i32 layer, f32 depth, u32 materialId)
i32 renderer_pollFrameCapture(u32 handle)
u32 renderer_getGpuDrawCalls()
Every draw the GPU was asked for in the last frame, every pass included (shadows, prepass,...
bool renderer_setQualityValue(const std::string &name, f32 value)
void renderer_endScreenOverlay(u32 targetHandle)
u32 springbone_snapshot(ecs::Registry ®istry, u32 entity)
i32 renderer_pollPreviewReadback()
void renderer_begin(uintptr_t matrixPtr, u32 targetHandle, i32 clearFlags, f32 r, f32 g, f32 b, f32 a, i32 clearX, i32 clearY, u32 clearW, u32 clearH)
void trail_update(ecs::Registry ®istry, f32 dt)
void registry_markComponentsChanged(ecs::Registry ®istry, uintptr_t pairsPtr, int count)
bool renderThread_complete(f64 fence)
void renderer_setTextureParams(u32 textureId, i32 minFilter, i32 magFilter, i32 wrapS, i32 wrapT)
void renderer_renderMaterialPreview(u32 materialId, i32 w, i32 h, u32 meshId, u32 textureId)
std::string renderer_takeTextureWants()
What size each texture was asked for since the last call, as handle:side pairs joined by commas,...
void renderer_submitScreenOverlay(ecs::Registry ®istry)
void renderer_setParticleDepthGrid(u32 texels)
bool probe_volume_getResolution(u32 volumeHandle, uintptr_t outPtr)
The finest grid's probes along x, y and z, as three ints at outPtr. False for no such volume.
u32 renderer_getPreviewWidth()
void renderer_setLodPreview(u32 view, u32 entity, i32 level)
Draw level for entity in view instead of the chosen one; a negative level goes back to the view's own...
void renderer_renderMeshPreview(u32 meshId, i32 w, i32 h)
u32 renderer_createSkeletalPreview(i32 w, i32 h)
bool renderer_hasCapturedData()
u32 mesh_setSkinChunks(u32 meshHandle, uintptr_t chunksPtr, u32 chunkCount, uintptr_t bonesPtr, u32 boneCount)
Gives a skinned mesh the chunks it is drawn in: chunkCount records of three u32 (first index,...
void registry_unwatchEntityChanges(ecs::Registry ®istry, u32 reader)
u32 renderer_getTriangles()
u32 meshRenderer_setMaterialAll(ecs::Registry ®istry, u32 materialId)
Points every MeshRenderer at one material; returns how many.
void renderer_setViewShading(u32 view, i32 mode)
Shade a view's meshes as authored (0), as neutral clay (1), as flat albedo (2), as wireframe (3),...
void renderer_submitSkeletalBatchByEntityEx(ecs::Registry ®istry, uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 textureId, i32 blendMode, u32 entity, f32 skelScale, bool flipX, bool flipY, i32 layer, f32 depth, u32 materialId, bool premultipliedColor)
i32 renderer_pollProbeCapture()
u32 renderer_createTarget(u32 width, u32 height, i32 flags)
void springbone_reset(ecs::Registry ®istry, u32 entity)
void renderer_setTreeSortLayers(u32 mask)
void renderer_beginFrame(f32 elapsedSec)
u32 renderer_getSprites()
void renderer_setShadowDistance(f32 distance)
void meshRenderer_setGeometry(ecs::Registry ®istry, u32 entity, uintptr_t posUvPtr, u32 vertexCount, uintptr_t colorsPtr, uintptr_t indicesPtr, u32 indexCount)
void renderer_setLightingDirect(bool on)
u32 renderer_getDrawsWaitingForProgram()
Scene draws the last frame left out because a program they use was still compiling in the background.
void renderer_setLodDistanceScale(f32 scale)
void environment_release(u32 environmentHandle)
Releases an environment. Its atlas is an ordinary texture and outlives it.
u32 renderer_captureTarget(u32 target, u32 w, u32 h)
void renderer_retainedTextBatch(u32 entity, uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 pageId, i32 glyphMode)
bool renderer_getAsyncComputeEnabled()
u32 renderer_getPreviewHeight()
void springbone_update(ecs::Registry ®istry, f32 dt)
bool renderer_takeTargetCapture(u32 handle, uintptr_t dest, u32 destSize)
std::string engine_getGpuScopes()
bool renderer_projectMaterialBake(u32 ticket, u32 material, u32 target, u32 instances)
Attach an additive, instanced projection to the just-queued material bake. Both run before the scene.
i32 renderer_renderSkeletalPreview(u32 preview, uintptr_t viewProjectionPtr)
void renderer_requestProbeCapture(f32 x, f32 y, f32 z, u32 face)
void renderer_setShadow2DSoftSamples(u32 samples)
void renderer_retainedTextClear(u32 entity)
Forgets an entity's retained text.
u32 renderer_getSnapshotWidth()
void probe_volume_release(u32 volumeHandle)
Releases a probe volume.
void renderer_setColorSpace(u32 linear)
u32 meshRenderer_setMeshAll(ecs::Registry ®istry, u32 meshHandle)
Points every MeshRenderer at one resident mesh; returns how many.
bool renderThread_enabled()
i32 renderer_lodInspect(u32 view, u32 entity, uintptr_t outPtr)
What view decided about entity's LOD, into four floats at outPtr: level, the level the bare threshold...
void renderer_setClearColor(f32 r, f32 g, f32 b, f32 a)
int registry_readWorldPoses2D(ecs::Registry ®istry, uintptr_t entitiesPtr, int count, uintptr_t outputPtr)
bool renderer_copyCapturedEntities(uintptr_t dest, u32 destSize)
i32 renderer_pollSnapshotReadback()
u32 renderer_getSkeletalPreviewWidth(u32 preview)
uintptr_t renderer_getPreviewPtr()
u32 renderer_getCapturedFrameSize()
u32 mesh_rematerializeFromChannels(u32 targetHandle, uintptr_t channelsPtr, u32 channelCount, u32 vertexStride, uintptr_t vertexPtr, u32 vertexBytes, uintptr_t indexPtr, u32 indexCount, f32 minX, f32 minY, f32 minZ, f32 maxX, f32 maxY, f32 maxZ, uintptr_t bindPtr, u32 bindFloats, uintptr_t morphPtr, u32 morphFloats, u32 morphTargets, u32 morphNormals)
Releases a mesh and the buffers it owns.
void renderer_replayToDrawCall(i32 drawCallIndex)
u32 renderer_getTargetDepthTexture(u32 handle)
uintptr_t renderer_getCapturedTextures()
void renderer_setCullingMask(u32 mask)
void renderer_setViewport(i32 x, i32 y, i32 w, i32 h)
u32 environment_create(uintptr_t shPtr, u32 specularHandle, f32 faceSize, u32 mipCount, f32 maxRange, u32 columns)
Registers a baked environment: nine irradiance coefficients and the prefiltered reflection an ambient...
u32 renderer_getSnapshotSize()
i32 renderer_pollSkeletalPreview(u32 preview)
void renderer_init(u32 width, u32 height)
Points a MeshRenderer at resident geometry; 0 returns it to its inline payload.
void renderer_setViewSkinWeights(u32 view, u32 entity, i32 joint)
Colour one skinned entity in a view by how much a joint moves each vertex.
void renderer_setScreenOverlayEffect(u32 material)
f64 renderer_getEstimatedGpuBytes()
void renderer_setAsyncShaderCompile(bool on)
i32 renderer_framePending()
1 while the GPU is still working on the frame last ended (GfxDevice::framePending); asks without wait...
void renderer_resize(u32 width, u32 height)
uintptr_t springbone_snapshotData()
void renderer_submitSkeletalBatchByEntity(ecs::Registry ®istry, uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 textureId, i32 blendMode, u32 entity, f32 skelScale, bool flipX, bool flipY, i32 layer, f32 depth, u32 materialId)
void renderer_drawOverScreen(i32 vpX, i32 vpY, u32 vpW, u32 vpH, u32 targetHandle)
uintptr_t renderer_getSkeletalPreviewPtr(u32 preview)
void mesh_release(u32 meshHandle)
void renderer_setQualityBudgets(u32 atlasSize, u32 cellSize, u32 cascades, u32 particleLimit)
void renderer_beginScreenOverlay(uintptr_t projectionPtr, i32 vpX, i32 vpY, u32 vpW, u32 vpH)
uintptr_t renderer_getCapturedEntities()
u32 springbone_snapshotCount()
u32 probe_volume_createBricks(i32 resX, i32 resY, i32 resZ, i32 brickCount, uintptr_t bricksPtr, uintptr_t shPtr)
Registers a sparse grid of baked irradiance: brickCount bricks of four ints (first finest-brick cell ...
std::uint32_t u32
Unsigned 32-bit integer.
void renderer_submitAll(ecs::Registry ®istry, i32 vpX, i32 vpY, i32 vpW, i32 vpH)
bool renderer_supportsAsyncCompute()
u32 renderer_getProbeDraws(bool perPixel)
Draws that read a probe volume last frame: per pixel when perPixel, else per object.
i32 renderer_submitSkeletalPreviewBatchEx(u32 preview, uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 textureId, i32 blendMode, uintptr_t transformPtr, i32 layer, f32 depth, u32 materialId, bool premultipliedColor)
void registry_batchSyncPhysicsTransforms(ecs::Registry ®istry, uintptr_t bufferPtr, int count, float ppu)
double registry_entityChangeSequence(ecs::Registry ®istry)
i32 renderer_shadowStatus(u32 entity, uintptr_t outPtr)
What the shadow atlas gave entity last frame, into five floats at outPtr: requested,...
void renderer_retainedTextSubmit(ecs::Registry ®istry, i32 screen, uintptr_t projectionPtr)
void renderer_setViewSelection(u32 view, uintptr_t idsPtr, u32 count)
The editor's selection in view, outlined on screen: count entity ids at idsPtr; zero clears it.
bool renderer_copySnapshot(uintptr_t dest, u32 destSize)
void renderer_setPreviewOrbit(f32 yawDegrees, f32 pitchDegrees)
The angle the next mesh or material preview is seen from, degrees: yaw about up, pitch above the hori...
void renderer_submitTextBatch(uintptr_t verticesPtr, i32 vertexCount, uintptr_t indicesPtr, i32 indexCount, u32 textureId, uintptr_t transformPtr, u32 entity, i32 layer, f32 depth, i32 glyphMode, u32 cullBit)
void renderer_destroySkeletalPreview(u32 preview)
bool renderer_copyCapturedRecords(uintptr_t dest, u32 destSize)
void renderer_captureNextFrame()
std::string engine_getCounters()
void engine_prepareMeshPrograms(u32 rowsPtr, u32 count, u32 outPtr)
Readies the mesh programs a prepared cell requires, and reports what a readiness claim must record (l...
void renderer_setMeshEdgeBuffers(bool enabled)
Give meshes realized from now on an edge buffer, for a wireframe view.
u32 renderer_getCapturedTextureCount()
void renderer_setViewLighting(u32 mode, f32 rotationDegrees, f32 keyIntensity, f32 fillIntensity, f32 skyIntensity, bool showSky)
double f64
64-bit floating point
void renderer_setSkinCache(i32 enabled, i32 behavior, f32 maxMegabytes)
The project's skin cache: on or off, which meshes go through it when their MeshSkin says Auto (0 ever...
u32 renderer_captureFrame(u32 w, u32 h)
void renderer_setDepthLayers(u32 mask)
void engine_setCpuProfiling(bool on)
void renderer_setOrigin(f64 x, f64 y, f64 z)
The point the next frames are drawn relative to (RenderOrigin.hpp); the view-projection they are begu...
void renderer_retainedTextBegin(u32 entity, i32 sdf, i32 screen, i32 hasBox, i32 layer, f32 boxWidth, f32 boxHeight, i32 autoKind)
i32 renderer_clusterInspect(u32 entity, uintptr_t outPtr)
What the last frames drew of entity's Cluster LOD mesh: triangles and clusters, two u32 at outPtr; 0 ...
u32 renderer_getCapturedPassCount()
double registry_entityChangeResetEpoch(ecs::Registry ®istry)
void gl_enableErrorCheck(bool enabled)
f64 renderer_getTextureBytes()
u32 renderer_getPendingShaders()
void renderer_setStage(i32 stage)
void renderer_setQualityConstants(f32 x, f32 y, f32 z, f32 w)
i32 renderer_lightStatus(u32 entity, uintptr_t outPtr)
What the light cap did to entity last frame, into nine floats at outPtr: accepted,...
u32 mesh_setClusters(u32 meshHandle, uintptr_t clustersPtr, u32 clusterCount, uintptr_t indexPtr, u32 indexCount)
Releases a mesh and the buffers it owns.
f64 renderer_programEpoch()
The renderer's current program-readiness epoch. A readiness record stamped with an older one names pr...
f64 renderer_getProbeAtlasBytes()
What the frame's probe atlas takes on the GPU, in bytes (0 while nothing reads per pixel).
u32 renderer_getTargetTexture(u32 handle)
void renderer_setEntityDrawOrder(ecs::Registry ®istry, uintptr_t entitiesPtr, u32 count)
void renderer_setParallaxAnchor(bool set, f64 x, f64 y)
void renderer_updateTransforms(ecs::Registry ®istry)
f64 renderer_deviceGeneration()
Which generation of the GPU device is current. Not part of a readiness claim — the guard that says th...
void trail_clear(ecs::Registry ®istry, u32 entity)
void renderer_setWorldUnitsPerMeter(f32 units)
double registry_componentMutationRevision(ecs::Registry ®istry, u32 component, bool topology)
u32 renderer_getSkeletalPreviewHeight(u32 preview)
u32 registry_getGeneration(ecs::Registry ®istry, u32 entity)
bool renderer_keepScreenOverlay(ecs::Registry ®istry, bool hostStill)
bool renderer_copyCapturedTextures(uintptr_t dest, u32 destSize)
i32 registry_getCanvasEntity(ecs::Registry ®istry)
int registry_readEntityChanges(ecs::Registry ®istry, double after, uintptr_t outputPtr, int capacity)
u32 renderer_getDrawCalls()
void renderer_setSkyEnvironment(u32 environmentHandle)
The environment the sky lights the scene with, 0 for none: an Ambient light that names no environment...
void renderer_entityVisibleToCamera(ecs::Registry ®istry, u32 entity, i32 layer, f32 minX, f32 minY, f32 maxX, f32 maxY, uintptr_t outVisiblePtr)
i32 probe_volume_getBricks(u32 volumeHandle, uintptr_t outPtr, i32 maxBricks)
A sparse volume's bricks, four ints each (first finest-brick cell x, y, z and span),...
u32 registry_watchEntityChanges(ecs::Registry ®istry)
float f32
32-bit floating point
void probe_volume_setSkyVisibility(u32 volumeHandle, uintptr_t visibilityPtr)
Releases a probe volume.
void environment_setSky(u32 environmentHandle, u32 skyHandle)
Gives an environment the panorama its sky is drawn from.
void renderer_setYSortLayers(u32 mask)
void renderer_setProbeVolumeReflection(u32 entity, u32 environmentHandle, u32 slot)
std::string renderer_getPlanarReflectionStatus(u32 view, u32 entity)
u32 meshRenderer_makeAllResident(ecs::Registry ®istry)
Freezes every MeshRenderer in the world; returns how many were frozen.
std::string engine_getCpuScopes()