From 09147e9d4d10f609a7f288b35fa7f86b7e011e8a Mon Sep 17 00:00:00 2001 From: pixel Date: Tue, 17 Jul 2007 03:29:13 +0000 Subject: Adding DDS initialisation. --- lib/dds.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib') diff --git a/lib/dds.c b/lib/dds.c index 82684d5..4263bf0 100644 --- a/lib/dds.c +++ b/lib/dds.c @@ -296,3 +296,27 @@ int loadCompressedTexture( const char *fname ) return g_compressedTextureID; } + +int ddsInit() { + char *ext = (char*)glGetString( GL_EXTENSIONS ); + + if( strstr( ext, "ARB_texture_compression" ) == NULL ) + { +// MessageBox(NULL,"ARB_texture_compression extension was not found", +// "ERROR",MB_OK|MB_ICONEXCLAMATION); + return -1; + } + else + { + glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)glxGetProcAddress("glCompressedTexImage2DARB"); + + if( !glCompressedTexImage2DARB ) + { +// MessageBox(NULL,"One or more ARB_texture_compression functions were not found", +// "ERROR",MB_OK|MB_ICONEXCLAMATION); + return -2; + } + } + + return 0; +} -- cgit v1.2.3