diff options
-rw-r--r-- | include/LuaFTGL.h | 7 | ||||
-rw-r--r-- | lib/dds.c | 21 |
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> @@ -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; |