Lines Matching defs:_env

85 nativeClassInit(JNIEnv *_env, jclass glImplClass)
87 jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
88 nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
90 jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
91 bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
93 jclass g11impClassLocal = _env->FindClass("com/google/android/gles_jni/GLImpl");
94 G11ImplClass = (jclass) _env->NewGlobalRef(g11impClassLocal);
95 haveCheckedExtensionsID = _env->GetFieldID(G11ImplClass, "haveCheckedExtensions", "Z");
96 have_OES_blend_equation_separateID = _env->GetFieldID(G11ImplClass, "have_OES_blend_equation_separate", "Z");
97 have_OES_blend_subtractID = _env->GetFieldID(G11ImplClass, "have_OES_blend_subtract", "Z");
98 have_OES_framebuffer_objectID = _env->GetFieldID(G11ImplClass, "have_OES_framebuffer_object", "Z");
99 have_OES_texture_cube_mapID = _env->GetFieldID(G11ImplClass, "have_OES_texture_cube_map", "Z");
101 getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
103 getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
105 getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
107 allowIndirectBuffersID = _env->GetStaticMethodID(g11impClassLocal,
109 positionID = _env->GetFieldID(bufferClass, "position", "I");
110 limitID = _env->GetFieldID(bufferClass, "limit", "I");
112 _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
116 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset)
123 position = _env->GetIntField(buffer, positionID);
124 limit = _env->GetIntField(buffer, limitID);
125 elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
127 pointer = _env->CallStaticLongMethod(nioAccessClass,
134 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
139 *offset = _env->CallStaticIntMethod(nioAccessClass,
146 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
148 _env->ReleasePrimitiveArrayCritical(array, data,
157 allowIndirectBuffers(JNIEnv *_env) {
160 jobject appName = _env->NewStringUTF(::__progname);
161 sIndirectBufferCompatability = _env->CallStaticBooleanMethod(G11ImplClass, allowIndirectBuffersID, appName) ? 2 : 1;
167 getDirectBufferPointer(JNIEnv *_env, jobject buffer) {
171 void* buf = _env->GetDirectBufferAddress(buffer);
173 jint position = _env->GetIntField(buffer, positionID);
174 jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
177 if (allowIndirectBuffers(_env)) {
181 buf = getPointer(_env, buffer, &array, &remaining, &offset);
183 releasePointer(_env, array, buf, 0);
187 jniThrowException(_env, "java/lang/IllegalArgumentException",
243 supportsExtension(JNIEnv *_env, jobject impl, jfieldID fieldId) {
244 if (!_env->GetBooleanField(impl, haveCheckedExtensionsID)) {
245 _env->SetBooleanField(impl, haveCheckedExtensionsID, true);
247 _env->SetBooleanField(impl, have_OES_blend_equation_separateID,
249 _env->SetBooleanField(impl, have_OES_blend_subtractID,
251 _env->SetBooleanField(impl, have_OES_framebuffer_objectID,
253 _env->SetBooleanField(impl, have_OES_texture_cube_mapID,
256 return _env->GetBooleanField(impl, fieldId);