diff options
author | pixel <pixel> | 2007-07-17 03:29:13 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-07-17 03:29:13 +0000 |
commit | 09147e9d4d10f609a7f288b35fa7f86b7e011e8a (patch) | |
tree | 7bbb73a01348b71c806c664d126c652d5f75030f /lib | |
parent | 0ce03af6e877adebeda12787e249871c1fca43f2 (diff) |
Adding DDS initialisation.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dds.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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; +} |