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 "org_lwjgl_devil_ILUT.h"
#include "common_tools.h" #include "common_tools.h"
#ifdef _X11
#include <dlfcn.h>
#endif
/*-----------------------------------------*/ /*-----------------------------------------*/
typedef unsigned int GLuint; typedef unsigned int GLuint;
@ -107,6 +111,27 @@ typedef struct ILpointi
#define IL_IMAGE_HEIGHT 0x0DE5 #define IL_IMAGE_HEIGHT 0x0DE5
#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8 #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 // Registered format procedures
typedef ILenum (ILAPIENTRY *IL_LOADPROC)(const ILstring); typedef ILenum (ILAPIENTRY *IL_LOADPROC)(const ILstring);
typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring); typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring);
@ -122,3 +147,4 @@ typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(const ILstring);
#endif #endif
#endif /* __EXTIL_H__ */ #endif /* __EXTIL_H__ */

View File

@ -113,3 +113,4 @@ void extil_Close(void) {
#endif #endif
devILhandle = NULL; devILhandle = NULL;
} }

View File

@ -8,3 +8,4 @@ extern void extil_Close(void);
extern void extil_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); extern void extil_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
#endif #endif

View File

@ -113,3 +113,4 @@ void extilu_Close(void) {
#endif #endif
devILUhandle = NULL; devILUhandle = NULL;
} }

View File

@ -8,3 +8,4 @@ extern void extilu_Close(void);
extern void extilu_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); extern void extilu_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
#endif #endif

View File

@ -113,3 +113,4 @@ void extilut_Close(void) {
#endif #endif
devILUThandle = NULL; devILUThandle = NULL;
} }

View File

@ -8,3 +8,4 @@ extern void extilut_Close(void);
extern void extilut_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); 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 *ilSetDataPROC) (ILvoid *Data);
typedef ILboolean (ILAPIENTRY *ilSetDurationPROC) (ILuint Duration); typedef ILboolean (ILAPIENTRY *ilSetDurationPROC) (ILuint Duration);
typedef ILvoid (ILAPIENTRY *ilSetIntegerPROC) (ILenum Mode, ILint Param); 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 *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 *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 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 *ilTexImagePROC) (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, ILvoid *Data);
typedef ILboolean (ILAPIENTRY *ilTypeFuncPROC) (ILenum Mode); typedef ILboolean (ILAPIENTRY *ilTypeFuncPROC) (ILenum Mode);