use TMaterialInstance for FFI API, add priority/layer params to load_glb_from_buffer
This commit is contained in:
@@ -407,12 +407,14 @@ extern "C"
|
|||||||
size_t length,
|
size_t length,
|
||||||
int numInstances,
|
int numInstances,
|
||||||
bool keepData,
|
bool keepData,
|
||||||
|
int priority,
|
||||||
|
int layer,
|
||||||
void (*callback)(EntityId))
|
void (*callback)(EntityId))
|
||||||
{
|
{
|
||||||
std::packaged_task<EntityId()> lambda(
|
std::packaged_task<EntityId()> lambda(
|
||||||
[=]() mutable
|
[=]() mutable
|
||||||
{
|
{
|
||||||
auto entity = load_glb_from_buffer(sceneManager, data, length, keepData);
|
auto entity = load_glb_from_buffer(sceneManager, data, length, keepData, priority, layer);
|
||||||
callback(entity);
|
callback(entity);
|
||||||
return entity;
|
return entity;
|
||||||
});
|
});
|
||||||
@@ -840,14 +842,14 @@ extern "C"
|
|||||||
uint16_t *indices,
|
uint16_t *indices,
|
||||||
int numIndices,
|
int numIndices,
|
||||||
int primitiveType,
|
int primitiveType,
|
||||||
const char *materialPath,
|
TMaterialInstance * materialInstance,
|
||||||
bool keepData,
|
bool keepData,
|
||||||
void (*callback)(EntityId))
|
void (*callback)(EntityId))
|
||||||
{
|
{
|
||||||
std::packaged_task<EntityId()> lambda(
|
std::packaged_task<EntityId()> lambda(
|
||||||
[=]
|
[=]
|
||||||
{
|
{
|
||||||
auto entity = create_geometry(sceneManager, vertices, numVertices, normals, numNormals, uvs, numUvs, indices, numIndices, primitiveType, materialPath);
|
auto entity = create_geometry(sceneManager, vertices, numVertices, normals, numNormals, uvs, numUvs, indices, numIndices, primitiveType, materialInstance, keepData);
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
MAIN_THREAD_EM_ASM({
|
MAIN_THREAD_EM_ASM({
|
||||||
moduleArg.dartFilamentResolveCallback($0,$1);
|
moduleArg.dartFilamentResolveCallback($0,$1);
|
||||||
|
|||||||
Reference in New Issue
Block a user