run all Android work on separate thread, add HotReloadPathHelper, separate loadTexture/setTexture

This commit is contained in:
Nick Fisher
2022-08-25 17:09:54 +10:00
parent 051085f440
commit f4c1f59399
12 changed files with 392 additions and 227 deletions

View File

@@ -15,7 +15,6 @@ extern "C" {
void* filament_viewer_new(void* texture, ResourceBuffer (*loadResource)(const char*), void (*freeResource)(uint32_t)) {
return nullptr;
}
void filament_viewer_delete(void* viewer) {
delete((FilamentViewer*)viewer);
@@ -135,8 +134,12 @@ extern "C" {
((FilamentViewer*)viewer)->clearAssets();
}
void set_texture(void* asset, const char* assetPath, int renderableIndex) {
((SceneAsset*)asset)->setTexture(assetPath, renderableIndex);
void load_texture(void* asset, const char* assetPath, int renderableIndex) {
((SceneAsset*)asset)->loadTexture(assetPath, renderableIndex);
}
void set_texture(void* asset) {
((SceneAsset*)asset)->setTexture();
}
void transform_to_unit_cube(void* asset) {