1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ANDROID_FILTERFW_JNI_GL_FRAME_H 18 #define ANDROID_FILTERFW_JNI_GL_FRAME_H 19 20 #include <jni.h> 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 JNIEXPORT jboolean JNICALL 27 Java_android_filterfw_core_GLFrame_nativeAllocate(JNIEnv* env, 28 jobject thiz, 29 jobject gl_env, 30 jint width, 31 jint height); 32 33 JNIEXPORT jboolean JNICALL 34 Java_android_filterfw_core_GLFrame_nativeAllocateWithTexture(JNIEnv* env, 35 jobject thiz, 36 jobject gl_env, 37 jint tex_id, 38 jint width, 39 jint height); 40 41 JNIEXPORT jboolean JNICALL 42 Java_android_filterfw_core_GLFrame_nativeAllocateWithFbo(JNIEnv* env, 43 jobject thiz, 44 jobject gl_env, 45 jint fbo_id, 46 jint width, 47 jint height); 48 49 JNIEXPORT jboolean JNICALL 50 Java_android_filterfw_core_GLFrame_nativeAllocateExternal(JNIEnv* env, 51 jobject thiz, 52 jobject gl_env); 53 54 JNIEXPORT jboolean JNICALL 55 Java_android_filterfw_core_GLFrame_nativeDeallocate(JNIEnv* env, jobject thiz); 56 57 JNIEXPORT jboolean JNICALL 58 Java_android_filterfw_core_GLFrame_setNativeInts(JNIEnv* env, jobject thiz, jintArray ints); 59 60 JNIEXPORT jintArray JNICALL 61 Java_android_filterfw_core_GLFrame_getNativeInts(JNIEnv* env, jobject thiz); 62 63 JNIEXPORT jboolean JNICALL 64 Java_android_filterfw_core_GLFrame_setNativeFloats(JNIEnv* env, jobject thiz, jfloatArray ints); 65 66 JNIEXPORT jfloatArray JNICALL 67 Java_android_filterfw_core_GLFrame_getNativeFloats(JNIEnv* env, jobject thiz); 68 69 JNIEXPORT jboolean JNICALL 70 Java_android_filterfw_core_GLFrame_setNativeData(JNIEnv* env, 71 jobject thiz, 72 jbyteArray data, 73 jint offset, 74 jint length); 75 76 JNIEXPORT jbyteArray JNICALL 77 Java_android_filterfw_core_GLFrame_getNativeData(JNIEnv* env, jobject thiz); 78 79 JNIEXPORT jboolean JNICALL 80 Java_android_filterfw_core_GLFrame_setNativeBitmap(JNIEnv* env, 81 jobject thiz, 82 jobject bitmap, 83 jint size); 84 85 JNIEXPORT jboolean JNICALL 86 Java_android_filterfw_core_GLFrame_getNativeBitmap(JNIEnv* env, jobject thiz, jobject bitmap); 87 88 JNIEXPORT jboolean JNICALL 89 Java_android_filterfw_core_GLFrame_setNativeViewport(JNIEnv* env, 90 jobject thiz, 91 jint x, 92 jint y, 93 jint width, 94 jint height); 95 96 JNIEXPORT jint JNICALL 97 Java_android_filterfw_core_GLFrame_getNativeTextureId(JNIEnv* env, jobject thiz); 98 99 JNIEXPORT jint JNICALL 100 Java_android_filterfw_core_GLFrame_getNativeFboId(JNIEnv* env, jobject thiz); 101 102 JNIEXPORT jboolean JNICALL 103 Java_android_filterfw_core_GLFrame_generateNativeMipMap(JNIEnv* env, jobject thiz); 104 105 JNIEXPORT jboolean JNICALL 106 Java_android_filterfw_core_GLFrame_setNativeTextureParam(JNIEnv* env, 107 jobject thiz, 108 jint param, 109 jint value); 110 111 JNIEXPORT jboolean JNICALL 112 Java_android_filterfw_core_GLFrame_nativeResetParams(JNIEnv* env, jobject thiz); 113 114 JNIEXPORT jboolean JNICALL 115 Java_android_filterfw_core_GLFrame_nativeCopyFromNative(JNIEnv* env, 116 jobject thiz, 117 jobject frame); 118 119 JNIEXPORT jboolean JNICALL 120 Java_android_filterfw_core_GLFrame_nativeCopyFromGL(JNIEnv* env, 121 jobject thiz, 122 jobject frame); 123 124 JNIEXPORT jboolean JNICALL 125 Java_android_filterfw_core_GLFrame_nativeFocus(JNIEnv* env, jobject thiz); 126 127 JNIEXPORT jboolean JNICALL 128 Java_android_filterfw_core_GLFrame_nativeReattachTexToFbo(JNIEnv* env, jobject thiz); 129 130 JNIEXPORT jboolean JNICALL 131 Java_android_filterfw_core_GLFrame_nativeDetachTexFromFbo(JNIEnv* env, jobject thiz); 132 133 #ifdef __cplusplus 134 } 135 #endif 136 137 #endif /* ANDROID_FILTERFW_JNI_GL_FRAME_H */ 138