Add files for ILUT portion of DevIL.
This commit is contained in:
parent
7d8cc6abbb
commit
3e1651e8e0
|
@ -420,6 +420,7 @@
|
|||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/devil" force="yes">
|
||||
<class name="org.lwjgl.devil.IL"/>
|
||||
<class name="org.lwjgl.devil.ILU"/>
|
||||
<class name="org.lwjgl.devil.ILUT"/>
|
||||
</javah>
|
||||
</target>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ if "%CHOME%" == "" goto errorchome
|
|||
if "%DEVILHOME%" == "" goto errordevilhome
|
||||
set COPTIONS=/I"%DEVILHOME%\include" /I"%PLTSDKHOME%\include" /I"%CHOME%\include" /I"%JAVA_HOME%\include" /I"%JAVA_HOME%\include\win32" /I"..\..\src\native\common" /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W0 /nologo /c /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LWJGL_EXPORTS" /D "_WINDLL"
|
||||
set LINKEROPTS=/link /LIBPATH:"%PLTSDKHOME%\Lib" /LIBPATH:"%CHOME%\Lib" /LIBPATH:"%DEVILHOME%\Lib" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 /NOLOGO /DLL
|
||||
set LIBS=user32.lib Gdi32.lib Advapi32.lib ILU.lib DevIL.lib
|
||||
set LIBS=user32.lib Gdi32.lib Advapi32.lib DevIL.lib ILU.lib ILUT.lib
|
||||
|
||||
for %%x in (..\..\src\native\common\devil\*.c) do cl %COPTIONS% %%x
|
||||
for %%x in (..\..\src\native\common\*common*.c) do cl %COPTIONS% %%x
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the name of 'LWJGL' nor the names of
|
||||
* its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.lwjgl.devil;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* The DevIL ILUT API.
|
||||
*
|
||||
* @author captainjester <captainjester@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class ILUT {
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
public static final int ILUT_VERSION_1_6_7 = 1;
|
||||
public static final int ILUT_VERSION = 167;
|
||||
|
||||
|
||||
// Attribute Bits
|
||||
public static final int ILUT_OPENGL_BIT = 0x00000001;
|
||||
public static final int ILUT_ALL_ATTRIB_BITS = 0x000FFFFF;
|
||||
|
||||
|
||||
// Error Types
|
||||
public static final int ILUT_INVALID_ENUM = 0x0501;
|
||||
public static final int ILUT_OUT_OF_MEMORY = 0x0502;
|
||||
public static final int ILUT_INVALID_VALUE = 0x0505;
|
||||
public static final int ILUT_ILLEGAL_OPERATION = 0x0506;
|
||||
public static final int ILUT_INVALID_PARAM = 0x0509;
|
||||
public static final int ILUT_COULD_NOT_OPEN_FILE = 0x050A;
|
||||
public static final int ILUT_STACK_OVERFLOW = 0x050E;
|
||||
public static final int ILUT_STACK_UNDERFLOW = 0x050F;
|
||||
public static final int ILUT_BAD_DIMENSIONS = 0x0511;
|
||||
public static final int ILUT_NOT_SUPPORTED = 0x0550;
|
||||
|
||||
|
||||
// State Definitions
|
||||
public static final int ILUT_PALETTE_MODE = 0x0600;
|
||||
public static final int ILUT_OPENGL_CONV = 0x0610;
|
||||
public static final int ILUT_MAXTEX_WIDTH = 0x0630;
|
||||
public static final int ILUT_MAXTEX_HEIGHT = 0x0631;
|
||||
public static final int ILUT_MAXTEX_DEPTH = 0x0632;
|
||||
public static final int ILUT_GL_USE_S3TC = 0x0634;
|
||||
public static final int ILUT_GL_GEN_S3TC = 0x0635;
|
||||
|
||||
// This new state does automatic texture target detection
|
||||
// if enabled. Currently, only cubemap detection is supported.
|
||||
// if the current image is no cubemap, the 2d texture is chosen.
|
||||
public static final int ILUT_GL_AUTODETECT_TEXTURE_TARGET = 0x0807;
|
||||
|
||||
// The different rendering api's...more to be added later?
|
||||
public static final int ILUT_OPENGL = 0;
|
||||
|
||||
static {
|
||||
System.loadLibrary("ILU");
|
||||
System.loadLibrary("lwjgl-devil");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if DevIL has been created
|
||||
*/
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
public static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
public static native boolean ilutRenderer(int renderer);
|
||||
|
||||
// ImageLib Utility Toolkit Functions
|
||||
public static native boolean ilutDisable(int mode);
|
||||
public static native boolean ilutEnable(int mode);
|
||||
public static native boolean ilutGetBoolean(int mode);
|
||||
// public static native void ilutGetBooleanv(int mode, ILboolean *Param);
|
||||
public static native int ilutGetInteger(int mode);
|
||||
// public static native void ilutGetIntegerv(int mode, ILint *Param);
|
||||
public static native String ilutGetString(int stringName);
|
||||
public static native void ilutInit();
|
||||
public static native boolean ilutIsDisabled(int mode);
|
||||
public static native boolean ilutIsEnabled(int mode);
|
||||
public static native void ilutPopAttrib();
|
||||
public static native void ilutPushAttrib(int bits);
|
||||
public static native void ilutSetInteger(int Mode, int param);
|
||||
|
||||
// ImageLib Utility Toolkit's OpenGL Functions
|
||||
public static native int ilutGLBindTexImage();
|
||||
public static native int ilutGLBindMipmaps();
|
||||
public static native boolean ilutGLBuildMipmaps();
|
||||
public static native int ilutGLLoadImage(String fileName);
|
||||
public static native boolean ilutGLScreen();
|
||||
public static native boolean ilutGLScreenie();
|
||||
public static native boolean ilutGLSaveImage(String fileName, int texID);
|
||||
public static native boolean ilutGLSetTex(int texID);
|
||||
public static native boolean ilutGLTexImage(int level);
|
||||
|
||||
public static void create() throws LWJGLException {
|
||||
if (!created) {
|
||||
nCreate();
|
||||
ILUT.initNativeStubs();
|
||||
ILUT.ilutInit();
|
||||
ilutRenderer(ILUT_OPENGL);
|
||||
created = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static native void nCreate();
|
||||
}
|
|
@ -4,10 +4,13 @@
|
|||
#include <jni.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
//#include <gl/gl.h>
|
||||
#include <IL/il.h>
|
||||
#include <IL/ilu.h>
|
||||
#include <IL/ilut.h>
|
||||
#include "org_lwjgl_devil_IL.h"
|
||||
#include "org_lwjgl_devil_ILU.h"
|
||||
#include "org_lwjgl_devil_ILUT.h"
|
||||
#include "common_tools.h"
|
||||
|
||||
|
||||
|
|
|
@ -183,9 +183,67 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILU_iluGenImage(JNIEnv *env, jclass
|
|||
/*
|
||||
* Class: org_lwjgl_devil_ILU
|
||||
* Method: iluGetImageInfo
|
||||
* Signature: ([Lorg/lwjgl/devil/ILinfo;)V
|
||||
* Signature: (Lorg/lwjgl/devil/ILinfo;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluGetImageInfo(JNIEnv *env, jclass clazz, jobjectArray info) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluGetImageInfo(JNIEnv *env, jclass clazz, jobject info) {
|
||||
jfieldID fieldId;
|
||||
ILinfo *imageInfo;
|
||||
|
||||
if(info == 0) {
|
||||
throwException(env, "ILinfo object must not be null.");
|
||||
}
|
||||
|
||||
imageInfo = (ILinfo *)malloc(sizeof(ILinfo));
|
||||
iluGetImageInfo(imageInfo);
|
||||
|
||||
clazz = (*env)->GetObjectClass(env, info);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "id", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Id);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "width", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Width);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "height", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Height);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "depth", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Depth);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "bpp", "B");
|
||||
(*env)->SetByteField(env, info, fieldId, (jbyte)imageInfo->Bpp);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "sizeOfData", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->SizeOfData);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "format", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Format);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "type", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Type);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "origin", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Origin);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "palType", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->PalType);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "palSize", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->PalSize);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "cubeFlags", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->CubeFlags);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "numNext", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumNext);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "numMips", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumMips);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "numLayers", "I");
|
||||
(*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumLayers);
|
||||
|
||||
free(imageInfo);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -298,6 +356,43 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILU_iluPixelize(JNIEnv *env, jcl
|
|||
* Signature: ([Lorg/lwjgl/devil/ILpointf;I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluRegionfv(JNIEnv *env, jclass clazz, jobjectArray points, jint n) {
|
||||
jfieldID fieldId;
|
||||
jmethodID methodId;
|
||||
jobject element;
|
||||
int i;
|
||||
ILpointf *pointInfo;
|
||||
|
||||
if(points == 0) {
|
||||
throwException(env, "ILpointf array must not be null.");
|
||||
}
|
||||
|
||||
pointInfo = (ILpointf *)malloc(sizeof(ILpointf) * n);
|
||||
iluGetImageInfo(pointInfo, n);
|
||||
|
||||
clazz = (*env)->FindClass(env, "org/lwjgl/devil/ILpointf");
|
||||
methodId = (*env)->GetMethodID(env, clazz, "<init>", "()V");
|
||||
|
||||
for(i=1;i<n;i++) {
|
||||
element = (*env)->NewObject(env, clazz, methodId);
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "x", "F");
|
||||
(*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->x));
|
||||
|
||||
fieldId = (*env)->GetFieldID(env, clazz, "y", "F");
|
||||
(*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->y));
|
||||
printf("\nHere 3");
|
||||
printf("\n (pointInfo + i)->x) = %f", (pointInfo + i)->x);
|
||||
printf("\n(*env)->GetFloatField(env, element, fieldId) = %f", (*env)->GetFloatField(env, element, fieldId));
|
||||
|
||||
printf("\npoints address=%p", points);
|
||||
printf("\nelement address=%p", element);
|
||||
printf("\ni = %d", i);
|
||||
(*env)->SetObjectArrayElement(env, points, i, element);
|
||||
printf("\nHere 4");
|
||||
}
|
||||
printf("\nHere 5");
|
||||
|
||||
free(pointInfo);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -395,7 +490,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILU_iluWave(JNIEnv *env, jclass
|
|||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nCreate(JNIEnv *env, jclass clazz) {
|
||||
/*if (!extilu_Open(env)) {
|
||||
throwException(env, "Failed to load DevIL library");
|
||||
throwException(env, "Failed to load ILU library");
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,226 @@
|
|||
#include "extil.h"
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutRenderer
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutRenderer(JNIEnv *env, jclass clazz, jint renderer){
|
||||
return ilutRenderer((ILenum)renderer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutDisable
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutDisable(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutDisable((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutEnable
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutEnable(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutEnable((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGetBoolean
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGetBoolean(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutGetBoolean((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGetInteger
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGetInteger(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutGetInteger((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGetString
|
||||
* Signature: (I)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL Java_org_lwjgl_devil_ILUT_ilutGetString(JNIEnv *env, jclass clazz, jint stringName){
|
||||
return NewStringNative(env, ilutGetString((ILenum)stringName));
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutInit
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutInit(JNIEnv *env, jclass clazz){
|
||||
ilutInit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutIsDisabled
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsDisabled(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutIsDisabled((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutIsEnabled
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsEnabled(JNIEnv *env, jclass clazz, jint mode){
|
||||
return ilutIsEnabled((ILenum)mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutPopAttrib
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPopAttrib(JNIEnv *env, jclass clazz){
|
||||
ilutPopAttrib();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutPushAttrib
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPushAttrib(JNIEnv *env, jclass clazz, jint bits){
|
||||
ilutPushAttrib((ILuint)bits);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutSetInteger
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutSetInteger(JNIEnv *env, jclass clazz, jint mode, jint param){
|
||||
ilutSetInteger((ILenum)mode, (ILint)param);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLBindTexImage
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindTexImage(JNIEnv *env, jclass clazz){
|
||||
return ilutGLBindTexImage();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLBindMipmaps
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindMipmaps(JNIEnv *env, jclass clazz){
|
||||
return ilutGLBindMipmaps();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLBuildMipmaps
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBuildMipmaps(JNIEnv *env, jclass clazz){
|
||||
return ilutGLBuildMipmaps();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLLoadImage
|
||||
* Signature: (Ljava/lang/String;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLLoadImage(JNIEnv *env, jclass clazz, jstring fileName){
|
||||
char *strFileName = GetStringNativeChars(env, fileName);
|
||||
jint result = ilutGLLoadImage((const ILstring)strFileName);
|
||||
free(strFileName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLScreen
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreen(JNIEnv *env, jclass clazz){
|
||||
return ilutGLScreen();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLScreenie
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreenie(JNIEnv *env, jclass clazz){
|
||||
return ilutGLScreenie();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLSaveImage
|
||||
* Signature: (Ljava/lang/String;I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSaveImage(JNIEnv *env, jclass clazz, jstring fileName, jint texID){
|
||||
char *strFileName = GetStringNativeChars(env, fileName);
|
||||
jboolean result = ilutGLSaveImage((const ILstring)strFileName, texID);
|
||||
free(strFileName);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLSetTex
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSetTex(JNIEnv *env, jclass clazz, jint texID){
|
||||
return ilutGLSetTex(texID);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: ilutGLTexImage
|
||||
* Signature: (I)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLTexImage(JNIEnv *env, jclass clazz, jint level){
|
||||
return ilutGLTexImage(level);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: nCreate
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate(JNIEnv *env, jclass clazz){
|
||||
/*if (!extilut_Open(env)) {
|
||||
throwException(env, "Failed to load ILUT library");
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: initNativeStubs
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs(JNIEnv *env, jclass clazz){
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue