summaryrefslogtreecommitdiff
path: root/lib/dds.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dds.c')
-rw-r--r--lib/dds.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/dds.c b/lib/dds.c
index 019ae36..4939e1b 100644
--- a/lib/dds.c
+++ b/lib/dds.c
@@ -232,7 +232,7 @@ static DDS_IMAGE_DATA* loadDDSTextureFile( const char *filename )
return pDDSImageData;
}
-int loadCompressedTexture( const char *fname )
+int loadCompressedTexture( const char *fname, int * pwidth, int * pheight )
{
int g_compressedTextureID;
DDS_IMAGE_DATA *pDDSImageData = loadDDSTextureFile( fname );
@@ -243,6 +243,11 @@ int loadCompressedTexture( const char *fname )
int nWidth = pDDSImageData->width;
int nNumMipMaps = pDDSImageData->numMipMaps;
+ if (pwidth)
+ *pwidth = nWidth;
+ if (pheight)
+ *pheight = nHeight;
+
int nBlockSize;
if( pDDSImageData->format == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT )