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

Function CreateSamplersArray

engine/modelc/src/modelimporter_jni.cpp:93–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static jobjectArray CreateSamplersArray(JNIEnv* env, dmModelImporter::jni::TypeInfos* types,
94 uint32_t count, const dmModelImporter::Sampler* samplers,
95 dmHashTable64<jobject>& cache)
96{
97 jobjectArray arr = env->NewObjectArray(count, types->m_SamplerJNI.cls, 0);
98 for (uint32_t i = 0; i < count; ++i)
99 {
100 const Sampler* sampler = &samplers[i];
101
102 jobject obj = C2J_CreateSampler(env, types, sampler);
103 env->SetObjectArrayElement(arr, i, obj);
104
105 AddToCache(cache, sampler, obj);
106 }
107 return arr;
108
109}
110
111static jobjectArray CreateTexturesArray(JNIEnv* env, dmModelImporter::jni::TypeInfos* types,
112 uint32_t count, const dmModelImporter::Texture* textures,

Callers 1

CreateJavaSceneFunction · 0.85

Calls 2

C2J_CreateSamplerFunction · 0.85
AddToCacheFunction · 0.70

Tested by

no test coverage detected