refactoring + texture projection

This commit is contained in:
Nick Fisher
2025-03-25 09:39:02 +08:00
parent 0cbbc058e0
commit 999b1e613f
33 changed files with 7357 additions and 1168 deletions

View File

@@ -20,7 +20,8 @@ EMSCRIPTEN_KEEPALIVE void Renderer_readPixels(
TRenderTarget *tRenderTarget,
TPixelDataFormat tPixelBufferFormat,
TPixelDataType tPixelDataType,
uint8_t *out
uint8_t *out,
size_t outLength
);
EMSCRIPTEN_KEEPALIVE void Renderer_setFrameInterval(
TRenderer *tRenderer,

View File

@@ -64,6 +64,7 @@ EMSCRIPTEN_KEEPALIVE bool View_isStencilBufferEnabled(TView *tView);
EMSCRIPTEN_KEEPALIVE void View_setDitheringEnabled(TView *tView, bool enabled);
EMSCRIPTEN_KEEPALIVE bool View_isDitheringEnabled(TView *tView);
EMSCRIPTEN_KEEPALIVE void View_setScene(TView *tView, TScene *tScene);
EMSCRIPTEN_KEEPALIVE void View_setFrontFaceWindingInverted(TView *tView, bool inverted);
typedef void (*PickCallback)(uint32_t requestId, EntityId entityId, float depth, float fragX, float fragY, float fragZ);
EMSCRIPTEN_KEEPALIVE void View_pick(TView* tView, uint32_t requestId, uint32_t x, uint32_t y, PickCallback callback);

View File

@@ -77,6 +77,7 @@ namespace thermion
TPixelDataFormat tPixelBufferFormat,
TPixelDataType tPixelDataType,
uint8_t *out,
size_t outLength,
void (*onComplete)());
EMSCRIPTEN_KEEPALIVE void Material_createInstanceRenderThread(TMaterial *tMaterial, void (*onComplete)(TMaterialInstance *));