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

Function C2J_CreateSamplerArray

engine/modelc/src/jni/Modelimporter_jni.cpp:814–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812 return arr;
813}
814jobjectArray C2J_CreateSamplerArray(JNIEnv* env, TypeInfos* types, const Sampler* src, uint32_t src_count) {
815 if (src == 0 || src_count == 0) return 0;
816 jobjectArray arr = env->NewObjectArray(src_count, types->m_SamplerJNI.cls, 0);
817 for (uint32_t i = 0; i < src_count; ++i) {
818 jobject obj = C2J_CreateSampler(env, types, &src[i]);
819 env->SetObjectArrayElement(arr, i, obj);
820 env->DeleteLocalRef(obj);
821 }
822 return arr;
823}
824jobjectArray C2J_CreateSamplerPtrArray(JNIEnv* env, TypeInfos* types, const Sampler* const* src, uint32_t src_count) {
825 if (src == 0 || src_count == 0) return 0;
826 jobjectArray arr = env->NewObjectArray(src_count, types->m_SamplerJNI.cls, 0);

Callers 1

C2J_CreateSceneFunction · 0.85

Calls 1

C2J_CreateSamplerFunction · 0.85

Tested by

no test coverage detected