| 91 | } |
| 92 | |
| 93 | static 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 | |
| 111 | static jobjectArray CreateTexturesArray(JNIEnv* env, dmModelImporter::jni::TypeInfos* types, |
| 112 | uint32_t count, const dmModelImporter::Texture* textures, |
no test coverage detected