summaryrefslogtreecommitdiff
path: root/lib/dds.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dds.c')
-rw-r--r--lib/dds.c24
1 files changed, 24 insertions, 0 deletions
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;
+}