linux fixes

This commit is contained in:
Brian Matzon 2005-03-25 10:25:07 +00:00
parent ff21520179
commit 2ed6dc2320
8 changed files with 42 additions and 10 deletions

View File

@ -9,6 +9,10 @@
#include "org_lwjgl_devil_ILUT.h"
#include "common_tools.h"
#ifdef _X11
#include <dlfcn.h>
#endif
/*-----------------------------------------*/
typedef unsigned int GLuint;
@ -107,6 +111,27 @@ typedef struct ILpointi
#define IL_IMAGE_HEIGHT 0x0DE5
#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
// Callback functions for file reading
typedef ILvoid (ILAPIENTRY *fCloseRProc)(ILHANDLE);
typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (const ILstring);
typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE);
// Callback functions for file writing
typedef ILvoid (ILAPIENTRY *fCloseWProc)(ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (const ILstring);
typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);
// Callback functions for allocation and deallocation
typedef ILvoid* (ILAPIENTRY *mAlloc)(ILuint);
typedef ILvoid (ILAPIENTRY *mFree) (ILvoid*);
// Registered format procedures
typedef ILenum (ILAPIENTRY *IL_LOADPROC)(const ILstring);
typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring);
@ -121,4 +146,5 @@ typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring);
#define APIENTRY
#endif
#endif /* __EXTIL_H__ */
#endif /* __EXTIL_H__ */

View File

@ -112,4 +112,5 @@ void extil_Close(void) {
// Cannot remove the image
#endif
devILhandle = NULL;
}
}

View File

@ -7,4 +7,5 @@ extern bool extil_Open(JNIEnv *env, jobjectArray ilPaths);
extern void extil_Close(void);
extern void extil_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
#endif
#endif

View File

@ -112,4 +112,5 @@ void extilu_Close(void) {
// Cannot remove the image
#endif
devILUhandle = NULL;
}
}

View File

@ -7,4 +7,5 @@ extern bool extilu_Open(JNIEnv *env, jobjectArray ilPaths);
extern void extilu_Close(void);
extern void extilu_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
#endif
#endif

View File

@ -112,4 +112,5 @@ void extilut_Close(void) {
// Cannot remove the image
#endif
devILUThandle = NULL;
}
}

View File

@ -7,4 +7,5 @@ extern bool extilut_Open(JNIEnv *env, jobjectArray ilPaths);
extern void extilut_Close(void);
extern void extilut_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
#endif
#endif

View File

@ -74,11 +74,11 @@ typedef ILboolean (ILAPIENTRY *ilSavePalPROC) (const ILstring FileName);
typedef ILboolean (ILAPIENTRY *ilSetDataPROC) (ILvoid *Data);
typedef ILboolean (ILAPIENTRY *ilSetDurationPROC) (ILuint Duration);
typedef ILvoid (ILAPIENTRY *ilSetIntegerPROC) (ILenum Mode, ILint Param);
typedef ILvoid (ILAPIENTRY *ilSetMemoryPROC) (mAlloc, mFree);
typedef ILvoid (ILAPIENTRY *ilSetMemoryPROC) (mAlloc AllocFunc, mFree FreeFunc);
typedef ILvoid (ILAPIENTRY *ilSetPixelsPROC) (ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, ILvoid *Data);
typedef ILvoid (ILAPIENTRY *ilSetReadPROC) (fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
typedef ILvoid (ILAPIENTRY *ilSetReadPROC) (fOpenRProc Open, fCloseRProc Close, fEofProc Eof, fGetcProc Getc, fReadProc Read, fSeekRProc Seek, fTellRProc Tell);
typedef ILvoid (ILAPIENTRY *ilSetStringPROC) (ILenum Mode, const char *String);
typedef ILvoid (ILAPIENTRY *ilSetWritePROC) (fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
typedef ILvoid (ILAPIENTRY *ilSetWritePROC) (fOpenWProc Open, fCloseWProc Close, fPutcProc Putc, fSeekWProc Seek, fTellWProc Tell, fWriteProc Write);
typedef ILvoid (ILAPIENTRY *ilShutDownPROC) (ILvoid);
typedef ILboolean (ILAPIENTRY *ilTexImagePROC) (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
typedef ILboolean (ILAPIENTRY *ilTypeFuncPROC) (ILenum Mode);