MCPcopy Create free account
hub / github.com/defold/defold / CreateBufferArray

Function CreateBufferArray

engine/modelc/src/modelimporter_jni.cpp:471–483  ·  view source on GitHub ↗

In our case we want to return array of length 0

Source from the content-addressed store, hash-verified

469
470// In our case we want to return array of length 0
471static jobjectArray CreateBufferArray(JNIEnv* env, dmModelImporter::jni::TypeInfos* types, const Buffer* src, uint32_t src_count, dmHashTable64<jobject>& cache)
472{
473 uint32_t count = src ? src_count : 0;
474 jobjectArray arr = env->NewObjectArray(count, types->m_BufferJNI.cls, 0);
475 for (uint32_t i = 0; i < count; ++i)
476 {
477 jobject obj = C2J_CreateBuffer(env, types, &src[i]);
478 env->SetObjectArrayElement(arr, i, obj);
479
480 AddToCache(cache, &src[i], obj);
481 }
482 return arr;
483}
484
485static jobject CreateJavaScene(JNIEnv* env, const dmModelImporter::Scene* scene)
486{

Callers 1

CreateJavaSceneFunction · 0.85

Calls 2

AddToCacheFunction · 0.70
C2J_CreateBufferFunction · 0.50

Tested by

no test coverage detected