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

Function C2J_CreateSampler

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

Source from the content-addressed store, hash-verified

398}
399
400jobject C2J_CreateSampler(JNIEnv* env, TypeInfos* types, const Sampler* src) {
401 if (src == 0) return 0;
402 jobject obj = env->AllocObject(types->m_SamplerJNI.cls);
403 dmJNI::SetString(env, obj, types->m_SamplerJNI.name, src->m_Name);
404 dmJNI::SetUInt(env, obj, types->m_SamplerJNI.index, src->m_Index);
405 dmJNI::SetInt(env, obj, types->m_SamplerJNI.magFilter, src->m_MagFilter);
406 dmJNI::SetInt(env, obj, types->m_SamplerJNI.minFilter, src->m_MinFilter);
407 dmJNI::SetInt(env, obj, types->m_SamplerJNI.wrapS, src->m_WrapS);
408 dmJNI::SetInt(env, obj, types->m_SamplerJNI.wrapT, src->m_WrapT);
409 return obj;
410}
411
412jobject C2J_CreateTexture(JNIEnv* env, TypeInfos* types, const Texture* src) {
413 if (src == 0) return 0;

Callers 4

CreateSamplersArrayFunction · 0.85
C2J_CreateTextureFunction · 0.85
C2J_CreateSamplerArrayFunction · 0.85

Calls 3

SetStringFunction · 0.85
SetUIntFunction · 0.85
SetIntFunction · 0.85

Tested by

no test coverage detected