diff options
Diffstat (limited to 'lib/dds.c')
-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; +} |