reworked devil dynamic stub to use generated header using a new ILNative class
This commit is contained in:
parent
a9bd41f12e
commit
20a9d2216c
|
@ -395,6 +395,11 @@
|
|||
<class name="org.lwjgl.fmod3.FMusic" />
|
||||
<class name="org.lwjgl.fmod3.FSound" />
|
||||
</javah>
|
||||
|
||||
<!-- DevIL -->
|
||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/devil" force="yes">
|
||||
<class name="org.lwjgl.devil.ILNative" />
|
||||
</javah>
|
||||
</target>
|
||||
|
||||
<!-- Creates the Javadoc -->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -41,7 +41,6 @@ import java.nio.IntBuffer;
|
|||
|
||||
import org.lwjgl.BufferChecks;
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
|
@ -295,9 +294,6 @@ public class IL {
|
|||
public static final int IL_SEEK_END = 2;
|
||||
public static final int IL_EOF = -1;
|
||||
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
public static native boolean ilActiveImage(int Number);
|
||||
public static native boolean ilActiveLayer(int Number);
|
||||
public static native boolean ilActiveMipmap(int Number);
|
||||
|
@ -362,7 +358,7 @@ public class IL {
|
|||
public static native ByteBuffer ilGetPalette();
|
||||
public static native String ilGetString(int StringName);
|
||||
public static native void ilHint(int Target, int Mode);
|
||||
private static native void ilInit();
|
||||
static native void ilInit();
|
||||
public static native boolean ilIsDisabled(int Mode);
|
||||
public static native boolean ilIsEnabled(int Mode);
|
||||
public static native boolean ilIsImage(int Image);
|
||||
|
@ -573,40 +569,8 @@ public class IL {
|
|||
return result;
|
||||
}
|
||||
|
||||
// public static native int ilGetDXTCData(ILvoid *Buffer, int BufferSize, int DXTCFormat);
|
||||
// public static native boolean ilIsValidF(int Type, ILHANDLE File);
|
||||
// public static native boolean ilLoadF(int Type, ILHANDLE File);
|
||||
// public static native boolean ilLoadDataF(ILHANDLE File, int Width, int Height, int Depth, ILubyte Bpp);
|
||||
// public static native int ilSaveF(int Type, ILHANDLE File);
|
||||
// public static native void ilRegisterFormat(int Format);
|
||||
// public static native boolean ilRegisterLoad(String Ext, IL_LOADPROC Load);
|
||||
// public static native boolean ilRegisterMipNum(int Num);
|
||||
// public static native boolean ilRegisterNumImages(int Num);
|
||||
// public static native void ilRegisterOrigin(int Origin);
|
||||
// public static void ilRegisterPal(ByteBuffer Pal, int Size, int Type);
|
||||
// public static native void nilRegisterPal(ByteBuffer Pal, int pal_position, int Size, int Type);
|
||||
// public static native boolean ilRegisterSave(String Ext, IL_SAVEPROC Save);
|
||||
// public static native void ilRegisterType(int Type);
|
||||
// public static native void ilSetMemory(mAlloc, mFree);
|
||||
// public static native void ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
|
||||
// public static native void ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
|
||||
|
||||
|
||||
static {
|
||||
System.loadLibrary("lwjgl-devil");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return true if DevIL has been created
|
||||
*/
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
private static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
private static native void resetNativeStubs(Class clazz);
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
/**
|
||||
* Creates a new instance of IL.
|
||||
|
@ -616,43 +580,24 @@ public class IL {
|
|||
return;
|
||||
}
|
||||
|
||||
String[] illPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"DevIL", "DevIL.dll",
|
||||
"IL", "libIL.so",
|
||||
"IL", "libIL.dylib"}, IL.class.getClassLoader());
|
||||
nCreate(illPaths);
|
||||
|
||||
try {
|
||||
IL.initNativeStubs();
|
||||
IL.ilInit();
|
||||
ILNative.createIL();
|
||||
created = true;
|
||||
} catch (LWJGLException e) {
|
||||
destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exit cleanly by calling destroy.
|
||||
*/
|
||||
public static void destroy() {
|
||||
resetNativeStubs(IL.class);
|
||||
|
||||
if (created) {
|
||||
nDestroy();
|
||||
}
|
||||
ILNative.destroyIL();
|
||||
created = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Native method to create IL instance
|
||||
*
|
||||
* @param ilPaths Array of strings containing paths to search for Devil library
|
||||
* @return true if DevIL has been created
|
||||
*/
|
||||
protected static native void nCreate(String[] ilPaths) throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method the destroy the IL
|
||||
*/
|
||||
protected static native void nDestroy();
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2005 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;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
* <p>
|
||||
* Native interface for DevIL
|
||||
* </p>
|
||||
*
|
||||
* @author Brian Matzon <brian@matzon.dk>
|
||||
* @version $Revision$
|
||||
*/
|
||||
class ILNative {
|
||||
|
||||
static {
|
||||
System.loadLibrary("lwjgl-devil");
|
||||
}
|
||||
|
||||
// IL
|
||||
// ===========================================================
|
||||
static native void initNativeStubsIL(Class clazz) throws LWJGLException;
|
||||
static native void resetNativeStubsIL(Class clazz);
|
||||
static native void nCreateIL(String[] ilPaths) throws LWJGLException;
|
||||
static native void nDestroyIL();
|
||||
|
||||
static void createIL() throws LWJGLException {
|
||||
String[] illPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"DevIL", "DevIL.dll",
|
||||
"IL", "libIL.so",
|
||||
"IL", "libIL.dylib"}, IL.class.getClassLoader());
|
||||
ILNative.nCreateIL(illPaths);
|
||||
|
||||
try {
|
||||
ILNative.initNativeStubsIL(IL.class);
|
||||
IL.ilInit();
|
||||
} catch (LWJGLException e) {
|
||||
IL.destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public static void destroyIL() {
|
||||
ILNative.resetNativeStubsIL(IL.class);
|
||||
ILNative.nDestroyIL();
|
||||
}
|
||||
// -----------------------------------------------------------
|
||||
|
||||
|
||||
// ILU
|
||||
// ===========================================================
|
||||
static native void initNativeStubsILU(Class clazz) throws LWJGLException;
|
||||
static native void resetNativeStubsILU(Class clazz);
|
||||
static native void nCreateILU(String[] iluPaths) throws LWJGLException;
|
||||
static native void nDestroyILU();
|
||||
|
||||
static void createILU() throws LWJGLException {
|
||||
String[] iluPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"ILU", "ILU.dll",
|
||||
"ILU", "libILU.so",
|
||||
"ILU", "libILU.dylib"}, ILU.class.getClassLoader());
|
||||
ILNative.nCreateILU(iluPaths);
|
||||
|
||||
try {
|
||||
ILNative.initNativeStubsILU(ILU.class);
|
||||
ILU.iluInit();
|
||||
} catch (LWJGLException e) {
|
||||
ILU.destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public static void destroyILU() {
|
||||
ILNative.resetNativeStubsILU(ILU.class);
|
||||
ILNative.nDestroyILU();
|
||||
}
|
||||
// -----------------------------------------------------------
|
||||
|
||||
// ILU
|
||||
// ===========================================================
|
||||
static native void initNativeStubsILUT(Class clazz) throws LWJGLException;
|
||||
static native void resetNativeStubsILUT(Class clazz);
|
||||
static native void nCreateILUT(String[] ilutPaths) throws LWJGLException;
|
||||
static native void nDestroyILUT();
|
||||
|
||||
static void createILUT() throws LWJGLException {
|
||||
String[] ilutPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"ILUT", "ILUT.dll",
|
||||
"ILUT", "libILUT.so",
|
||||
"ILUT", "libILUT.dylib"}, ILUT.class.getClassLoader());
|
||||
ILNative.nCreateILUT(ilutPaths);
|
||||
|
||||
try {
|
||||
ILNative.initNativeStubsILUT(ILUT.class);
|
||||
ILUT.ilutInit();
|
||||
} catch (LWJGLException e) {
|
||||
ILUT.destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public static void destroyILUT() {
|
||||
ILNative.resetNativeStubsILUT(ILUT.class);
|
||||
ILNative.nDestroyILUT();
|
||||
}
|
||||
// -----------------------------------------------------------
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -35,7 +35,6 @@ import java.nio.IntBuffer;
|
|||
|
||||
import org.lwjgl.BufferChecks;
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
|
@ -79,16 +78,6 @@ public class ILU {
|
|||
public static final int ILU_VERSION_NUM = IL.IL_VERSION_NUM;
|
||||
public static final int ILU_VENDOR = IL.IL_VENDOR;
|
||||
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
/**
|
||||
* @return true if ILU has been created
|
||||
*/
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
public static native boolean iluAlienify();
|
||||
public static native boolean iluBlurAvg(int iter);
|
||||
public static native boolean iluBlurGaussian(int iter);
|
||||
|
@ -118,7 +107,7 @@ public class ILU {
|
|||
private static native void niluGetIntegerv(int mode, IntBuffer param, int param_offset);
|
||||
public static native String iluGetString(int stringName);
|
||||
public static native void iluImageParameter(int pName, int param);
|
||||
private static native void iluInit();
|
||||
static native void iluInit();
|
||||
public static native boolean iluInvertAlpha();
|
||||
public static native int iluLoadImage(String fileName);
|
||||
public static native boolean iluMirror();
|
||||
|
@ -155,6 +144,9 @@ public class ILU {
|
|||
}
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
/**
|
||||
* Creates a new instance of ILU. Cannot be created unless IL has been created.
|
||||
*/
|
||||
|
@ -163,55 +155,24 @@ public class ILU {
|
|||
throw new LWJGLException("Cannot create ILU without having created IL instance");
|
||||
}
|
||||
|
||||
String[] iluPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"ILU", "ILU.dll",
|
||||
"ILU", "libILU.so",
|
||||
"ILU", "libILU.dylib"}, ILU.class.getClassLoader());
|
||||
nCreate(iluPaths);
|
||||
|
||||
try {
|
||||
ILU.initNativeStubs();
|
||||
ILU.iluInit();
|
||||
ILNative.createILU();
|
||||
created = true;
|
||||
} catch (LWJGLException e) {
|
||||
destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
static native void resetNativeStubs(Class clazz);
|
||||
|
||||
/**
|
||||
* Exit cleanly by calling destroy.
|
||||
*/
|
||||
public static void destroy() {
|
||||
resetNativeStubs(ILU.class);
|
||||
if (created) {
|
||||
nDestroy();
|
||||
}
|
||||
ILNative.destroyILU();
|
||||
created = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Native method to create ILU instance
|
||||
*
|
||||
* @param iluPaths Array of strings containing paths to search for ILU library
|
||||
* @return true if ILU has been created
|
||||
*/
|
||||
protected static native void nCreate(String[] iluPaths) throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method the destroy the ILU
|
||||
*/
|
||||
static native void nDestroy();
|
||||
|
||||
/**
|
||||
* Forcefully set created. Used internally by mac platform since
|
||||
* it loads ilu/ilut in IL and needs to mark them as created
|
||||
* @param created value to set created to
|
||||
*/
|
||||
static void setCreated(boolean created) {
|
||||
ILU.created = created;
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -35,7 +35,6 @@ import java.nio.ByteBuffer;
|
|||
import java.nio.IntBuffer;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.LWJGLUtil;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
|
@ -83,9 +82,6 @@ public class ILUT {
|
|||
public static final int ILUT_VENDOR = IL.IL_VENDOR;
|
||||
public static final int ILUT_VERSION_NUM = IL.IL_VERSION_NUM;
|
||||
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
public static native boolean ilutRenderer(int renderer);
|
||||
public static native boolean ilutDisable(int mode);
|
||||
public static native boolean ilutEnable(int mode);
|
||||
|
@ -94,7 +90,7 @@ public class ILUT {
|
|||
public static native void ilutGetBooleanv(int mode, ByteBuffer param);
|
||||
public static native void ilutGetIntegerv(int mode, IntBuffer Param);
|
||||
public static native String ilutGetString(int stringName);
|
||||
private static native void ilutInit();
|
||||
static native void ilutInit();
|
||||
public static native boolean ilutIsDisabled(int mode);
|
||||
public static native boolean ilutIsEnabled(int mode);
|
||||
public static native void ilutPopAttrib();
|
||||
|
@ -113,12 +109,8 @@ public class ILUT {
|
|||
public static native boolean ilutGLSetTex(int texID);
|
||||
public static native boolean ilutGLTexImage(int level);
|
||||
|
||||
/**
|
||||
* @return true if ILUT has been created
|
||||
*/
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
/** Have we been created? */
|
||||
protected static boolean created;
|
||||
|
||||
/**
|
||||
* Creates a new instance of ILUT. Cannot be created unless IL has been created.
|
||||
|
@ -128,55 +120,24 @@ public class ILUT {
|
|||
throw new LWJGLException("Cannot create ILUT without having created IL instance");
|
||||
}
|
||||
|
||||
String[] ilutPaths = LWJGLUtil.getLibraryPaths(new String[]{
|
||||
"ILUT", "ILUT.dll",
|
||||
"ILUT", "libILUT.so",
|
||||
"ILUT", "libILUT.dylib"}, ILUT.class.getClassLoader());
|
||||
nCreate(ilutPaths);
|
||||
|
||||
try {
|
||||
ILUT.initNativeStubs();
|
||||
ILUT.ilutInit();
|
||||
ILNative.createILUT();
|
||||
created = true;
|
||||
} catch (LWJGLException e) {
|
||||
destroy();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
static native void resetNativeStubs(Class clazz);
|
||||
|
||||
/**
|
||||
* Exit cleanly by calling destroy.
|
||||
*/
|
||||
public static void destroy() {
|
||||
resetNativeStubs(ILUT.class);
|
||||
if (created) {
|
||||
nDestroy();
|
||||
}
|
||||
ILNative.destroyILUT();
|
||||
created = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Native method to create ILUT instance
|
||||
*
|
||||
* @param ilutPaths Array of strings containing paths to search for ILUT library
|
||||
* @return true if ILUT has been created
|
||||
*/
|
||||
protected static native void nCreate(String[] ilutPaths) throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method the destroy the ILUT
|
||||
*/
|
||||
protected static native void nDestroy();
|
||||
|
||||
/**
|
||||
* Forcefully set created. Used internally by mac platform since
|
||||
* it loads ilu/ilut in IL and needs to mark them as created
|
||||
* @param created value to set created to
|
||||
*/
|
||||
static void setCreated(boolean created) {
|
||||
ILUT.created = created;
|
||||
public static boolean isCreated() {
|
||||
return created;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL Project
|
||||
* Copyright (c) 2002-2005 LWJGL Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "extil.h"
|
||||
#include "org_lwjgl_devil_IL.h"
|
||||
#include "org_lwjgl_devil_ILNative.h"
|
||||
|
||||
typedef ILboolean (ILAPIENTRY *ilActiveImagePROC) (ILuint Number);
|
||||
typedef ILboolean (ILAPIENTRY *ilActiveLayerPROC) (ILuint Number);
|
||||
|
@ -911,22 +911,22 @@ static jboolean JNICALL Java_org_lwjgl_devil_IL_ilSaveData(JNIEnv *env, jclass c
|
|||
* Method: nCreate
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nCreate(JNIEnv *env, jclass clazz, jobjectArray ilPaths) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nCreateIL(JNIEnv *env, jclass clazz, jobjectArray ilPaths) {
|
||||
if (!extil_Open(env, ilPaths)) {
|
||||
throwException(env, "Failed to load DevIL library");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nDestroy(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nDestroyIL(JNIEnv *env, jclass clazz) {
|
||||
extil_Close();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_resetNativeStubs(JNIEnv *env, jclass clazz, jclass il_class) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_resetNativeStubsIL(JNIEnv *env, jclass clazz, jclass il_class) {
|
||||
(*env)->UnregisterNatives(env, il_class);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_initNativeStubs(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_initNativeStubsIL(JNIEnv *env, jclass clazz, jclass il_class) {
|
||||
JavaMethodAndExtFunction functions[] = {
|
||||
{"ilActiveImage", "(I)Z", (void*)&Java_org_lwjgl_devil_IL_ilActiveImage, "ilActiveImage", (void*)&ilActiveImage},
|
||||
{"ilActiveLayer", "(I)Z", (void*)&Java_org_lwjgl_devil_IL_ilActiveLayer, "ilActiveLayer", (void*)&ilActiveLayer},
|
||||
|
@ -998,5 +998,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_initNativeStubs(JNIEnv *env, jcla
|
|||
{"ilSaveData", "(Ljava/lang/String;)Z", (void*)&Java_org_lwjgl_devil_IL_ilSaveData, "ilSaveData", (void*)&ilSaveData}
|
||||
};
|
||||
int num_functions = NUMFUNCTIONS(functions);
|
||||
extil_InitializeClass(env, clazz, num_functions, functions);
|
||||
printf("hrmph\n");
|
||||
|
||||
extil_InitializeClass(env, il_class, num_functions, functions);
|
||||
}
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_lwjgl_devil_IL */
|
||||
|
||||
#ifndef _Included_org_lwjgl_devil_IL
|
||||
#define _Included_org_lwjgl_devil_IL
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_IL
|
||||
* Method: initNativeStubs
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_initNativeStubs
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_IL
|
||||
* Method: resetNativeStubs
|
||||
* Signature: (Ljava/lang/Class;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_resetNativeStubs
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_IL
|
||||
* Method: nCreate
|
||||
* Signature: ([Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nCreate
|
||||
(JNIEnv *, jclass, jobjectArray);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_IL
|
||||
* Method: nDestroy
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_IL_nDestroy
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
#include "extilu.h"
|
||||
#include "org_lwjgl_devil_ILU.h"
|
||||
#include "org_lwjgl_devil_ILNative.h"
|
||||
|
||||
typedef ILboolean (ILAPIENTRY *iluAlienifyPROC) (ILvoid);
|
||||
typedef ILboolean (ILAPIENTRY *iluBlurAvgPROC) (ILuint Iter);
|
||||
|
@ -531,22 +531,22 @@ static jboolean JNICALL Java_org_lwjgl_devil_ILU_iluWave(JNIEnv *env, jclass cla
|
|||
* Method: nCreate
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nCreate(JNIEnv *env, jclass clazz, jobjectArray iluPaths) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nCreateILU(JNIEnv *env, jclass clazz, jobjectArray iluPaths) {
|
||||
if (!extilu_Open(env, iluPaths)) {
|
||||
throwException(env, "Failed to load ILU library");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nDestroy(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nDestroyILU(JNIEnv *env, jclass clazz) {
|
||||
extilu_Close();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_resetNativeStubs(JNIEnv *env, jclass clazz, jclass ilu_class) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_resetNativeStubsILU(JNIEnv *env, jclass clazz, jclass ilu_class) {
|
||||
(*env)->UnregisterNatives(env, ilu_class);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_initNativeStubs(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_initNativeStubsILU(JNIEnv *env, jclass clazz, jclass ilu_class) {
|
||||
JavaMethodAndExtFunction functions[] = {
|
||||
{"iluAlienify", "()Z", (void*)&Java_org_lwjgl_devil_ILU_iluAlienify, "iluAlienify", (void*)&iluAlienify},
|
||||
{"iluBlurAvg", "(I)Z", (void*)&Java_org_lwjgl_devil_ILU_iluBlurAvg, "iluBlurAvg", (void*)&iluBlurAvg},
|
||||
|
@ -591,5 +591,5 @@ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_initNativeStubs(JNIEnv *env, jcl
|
|||
{"iluWave", "(F)Z", (void*)&Java_org_lwjgl_devil_ILU_iluWave, "iluWave", (void*)&iluWave},
|
||||
};
|
||||
int num_functions = NUMFUNCTIONS(functions);
|
||||
extilu_InitializeClass(env, clazz, num_functions, functions);
|
||||
extilu_InitializeClass(env, ilu_class, num_functions, functions);
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_lwjgl_devil_ILU */
|
||||
|
||||
#ifndef _Included_org_lwjgl_devil_ILU
|
||||
#define _Included_org_lwjgl_devil_ILU
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILU
|
||||
* Method: initNativeStubs
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_initNativeStubs
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILU
|
||||
* Method: resetNativeStubs
|
||||
* Signature: (Ljava/lang/Class;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_resetNativeStubs
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILU
|
||||
* Method: nCreate
|
||||
* Signature: ([Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nCreate
|
||||
(JNIEnv *, jclass, jobjectArray);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILU
|
||||
* Method: nDestroy
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nDestroy
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
#include "extilut.h"
|
||||
#include "org_lwjgl_devil_ILUT.h"
|
||||
#include "org_lwjgl_devil_ILNative.h"
|
||||
|
||||
typedef ILboolean (ILAPIENTRY *ilutRendererPROC) (ILenum Renderer);
|
||||
typedef ILboolean (ILAPIENTRY *ilutDisablePROC) (ILenum Mode);
|
||||
|
@ -269,22 +269,22 @@ static jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLTexImage(JNIEnv *env, jc
|
|||
* Method: nCreate
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate(JNIEnv *env, jclass clazz, jobjectArray ilutPaths){
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nCreateILUT(JNIEnv *env, jclass clazz, jobjectArray ilutPaths){
|
||||
if (!extilut_Open(env, ilutPaths)) {
|
||||
throwException(env, "Failed to load ILUT library");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nDestroy(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_nDestroyILUT(JNIEnv *env, jclass clazz) {
|
||||
extilut_Close();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_resetNativeStubs(JNIEnv *env, jclass clazz, jclass ilut_class) {
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_resetNativeStubsILUT(JNIEnv *env, jclass clazz, jclass ilut_class) {
|
||||
(*env)->UnregisterNatives(env, ilut_class);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs(JNIEnv *env, jclass clazz){
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILNative_initNativeStubsILUT(JNIEnv *env, jclass clazz, jclass ilut_class){
|
||||
JavaMethodAndExtFunction functions[] = {
|
||||
{"ilutRenderer", "(I)Z", (void*)&Java_org_lwjgl_devil_ILUT_ilutRenderer, "ilutRenderer", (void*)&ilutRenderer},
|
||||
{"ilutDisable", "(I)Z", (void*)&Java_org_lwjgl_devil_ILUT_ilutDisable, "ilutDisable", (void*)&ilutDisable},
|
||||
|
@ -312,5 +312,5 @@ JavaMethodAndExtFunction functions[] = {
|
|||
{"ilutGLTexImage", "(I)Z", (void*)&Java_org_lwjgl_devil_ILUT_ilutGLTexImage, "ilutGLTexImage", (void*)&ilutGLTexImage},
|
||||
};
|
||||
int num_functions = NUMFUNCTIONS(functions);
|
||||
extilut_InitializeClass(env, clazz, num_functions, functions);
|
||||
extilut_InitializeClass(env, ilut_class, num_functions, functions);
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* DO NOT EDIT THIS FILE - it is machine generated */
|
||||
#include <jni.h>
|
||||
/* Header for class org_lwjgl_devil_ILUT */
|
||||
|
||||
#ifndef _Included_org_lwjgl_devil_ILUT
|
||||
#define _Included_org_lwjgl_devil_ILUT
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: initNativeStubs
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: resetNativeStubs
|
||||
* Signature: (Ljava/lang/Class;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_resetNativeStubs
|
||||
(JNIEnv *, jclass, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: nCreate
|
||||
* Signature: ([Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate
|
||||
(JNIEnv *, jclass, jobjectArray);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_devil_ILUT
|
||||
* Method: nDestroy
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nDestroy
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue