summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-07 13:57:11 +0000
committerpixel <pixel>2008-08-07 13:57:11 +0000
commit4a72f3da8cbcd6693d58b6308d780cfa06aa9172 (patch)
tree47f1fb8a8e865049e54c729b91ea8af2ebe4cf9d
parentf557328c86f0c5e2be3ab147f43c131bc245e8e3 (diff)
compatibility updates...
-rw-r--r--include/LuaFTGL.h7
-rw-r--r--lib/dds.c21
2 files changed, 15 insertions, 13 deletions
diff --git a/include/LuaFTGL.h b/include/LuaFTGL.h
index 48a3016..322d3ea 100644
--- a/include/LuaFTGL.h
+++ b/include/LuaFTGL.h
@@ -1,12 +1,7 @@
#ifndef __LUAFTGL_H__
#define __LUAFTGL_H__
-#include <FTGLExtrdFont.h>
-#include <FTGLOutlineFont.h>
-#include <FTGLPolygonFont.h>
-#include <FTGLTextureFont.h>
-#include <FTGLPixmapFont.h>
-#include <FTGLBitmapFont.h>
+#include <FTGL/ftgl.h>
#include <Exceptions.h>
#include <BLua.h>
diff --git a/lib/dds.c b/lib/dds.c
index 8138cd9..066b029 100644
--- a/lib/dds.c
+++ b/lib/dds.c
@@ -5,8 +5,11 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h> // Your local header file
+#ifdef USE_OSMESA
+#include <GL/osmesa.h>
+#endif
-//PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;
+PFNGLCOMPRESSEDTEXIMAGE2DARBPROC l_glCompressedTexImage2DARB;
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((uint32_t)(uint8_t)(ch0) | ((uint32_t)(uint8_t)(ch1) << 8) | \
@@ -279,7 +282,7 @@ int loadCompressedTexture( DDS_IMAGE_DATA *pDDSImageData )
nSize = ((nWidth+3)/4) * ((nHeight+3)/4) * nBlockSize;
- glCompressedTexImage2DARB( GL_TEXTURE_2D,
+ l_glCompressedTexImage2DARB( GL_TEXTURE_2D,
i,
pDDSImageData->format,
nWidth,
@@ -310,14 +313,18 @@ int ddsInit() {
}
else
{
-// glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)glxGetProcAddress("glCompressedTexImage2DARB");
+#ifdef USE_OSMESA
+ l_glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)OSMesaGetProcAddress("glCompressedTexImage2DARB");
+#else
+ l_glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)glxGetProcAddress("glCompressedTexImage2DARB");
+#endif
-// if( !glCompressedTexImage2DARB )
-// {
+ if( !l_glCompressedTexImage2DARB )
+ {
// MessageBox(NULL,"One or more ARB_texture_compression functions were not found",
// "ERROR",MB_OK|MB_ICONEXCLAMATION);
-// return -2;
-// }
+ return -2;
+ }
}
return 0;