feat: add capture() function and expose viewportDimensions on ThermionViewer (allows easier saving of captured images to PNG)
This commit is contained in:
@@ -150,6 +150,7 @@ namespace thermion_filament
|
||||
|
||||
void setRecording(bool recording);
|
||||
void setRecordingOutputDirectory(const char *path);
|
||||
void capture(uint8_t *out, void (*onComplete)());
|
||||
|
||||
void setAntiAliasing(bool msaaEnabled, bool fxaaEnabled, bool taaEnabled);
|
||||
void setDepthOfField();
|
||||
|
||||
@@ -107,6 +107,10 @@ extern "C"
|
||||
void *pixelBuffer,
|
||||
void (*callback)(void *buf, size_t size, void *data),
|
||||
void *data);
|
||||
EMSCRIPTEN_KEEPALIVE void capture(
|
||||
const void *const viewer,
|
||||
uint8_t *pixelBuffer,
|
||||
void (*callback)(void));
|
||||
EMSCRIPTEN_KEEPALIVE void create_swap_chain(const void *const viewer, const void *const window, uint32_t width, uint32_t height);
|
||||
EMSCRIPTEN_KEEPALIVE void destroy_swap_chain(const void *const viewer);
|
||||
EMSCRIPTEN_KEEPALIVE void set_frame_interval(const void *const viewer, float interval);
|
||||
|
||||
@@ -30,6 +30,7 @@ extern "C"
|
||||
EMSCRIPTEN_KEEPALIVE void create_render_target_ffi(void *const viewer, intptr_t nativeTextureId, uint32_t width, uint32_t height, void (*onComplete)());
|
||||
EMSCRIPTEN_KEEPALIVE void destroy_filament_viewer_ffi(void *const viewer);
|
||||
EMSCRIPTEN_KEEPALIVE void render_ffi(void *const viewer);
|
||||
EMSCRIPTEN_KEEPALIVE void capture_ffi(void *const viewer, uint8_t* out, void (*onComplete)());
|
||||
EMSCRIPTEN_KEEPALIVE FilamentRenderCallback make_render_callback_fn_pointer(FilamentRenderCallback);
|
||||
EMSCRIPTEN_KEEPALIVE void set_rendering_ffi(void *const viewer, bool rendering, void(*onComplete)());
|
||||
EMSCRIPTEN_KEEPALIVE void set_frame_interval_ffi(void *const viewer, float frameInterval);
|
||||
|
||||
Reference in New Issue
Block a user