|
|
@ -396,6 +396,8 @@ static size_t GL_CalcTextureSize( GLenum format, int width, int height, int dept |
|
|
|
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: |
|
|
|
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: |
|
|
|
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: |
|
|
|
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: |
|
|
|
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT: |
|
|
|
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT: |
|
|
|
|
|
|
|
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB: |
|
|
|
|
|
|
|
case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: |
|
|
|
size = (((width + 3) >> 2) * ((height + 3) >> 2) * 16) * depth; |
|
|
|
size = (((width + 3) >> 2) * ((height + 3) >> 2) * 16) * depth; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGBA8: |
|
|
|
case GL_RGBA8: |
|
|
@ -451,10 +453,14 @@ static size_t GL_CalcTextureSize( GLenum format, int width, int height, int dept |
|
|
|
size = width * height * depth * 8; |
|
|
|
size = width * height * depth * 8; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGB16F_ARB: |
|
|
|
case GL_RGB16F_ARB: |
|
|
|
|
|
|
|
size = width * height * depth * 6; |
|
|
|
|
|
|
|
break; |
|
|
|
case GL_RGBA16F_ARB: |
|
|
|
case GL_RGBA16F_ARB: |
|
|
|
size = width * height * depth * 8; |
|
|
|
size = width * height * depth * 8; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGB32F_ARB: |
|
|
|
case GL_RGB32F_ARB: |
|
|
|
|
|
|
|
size = width * height * depth * 12; |
|
|
|
|
|
|
|
break; |
|
|
|
case GL_RGBA32F_ARB: |
|
|
|
case GL_RGBA32F_ARB: |
|
|
|
size = width * height * depth * 16; |
|
|
|
size = width * height * depth * 16; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -661,7 +667,11 @@ static void GL_SetTextureFormat( gl_texture_t *tex, pixformat_t format, int chan |
|
|
|
case PF_DXT1: tex->format = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break; // never use DXT1 with 1-bit alpha
|
|
|
|
case PF_DXT1: tex->format = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break; // never use DXT1 with 1-bit alpha
|
|
|
|
case PF_DXT3: tex->format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break; |
|
|
|
case PF_DXT3: tex->format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break; |
|
|
|
case PF_DXT5: tex->format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break; |
|
|
|
case PF_DXT5: tex->format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break; |
|
|
|
case PF_ATI2: tex->format = GL_COMPRESSED_RED_GREEN_RGTC2_EXT; break; |
|
|
|
case PF_ATI2: |
|
|
|
|
|
|
|
if( glConfig.hardware_type == GLHW_RADEON ) |
|
|
|
|
|
|
|
tex->format = GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI; |
|
|
|
|
|
|
|
else tex->format = GL_COMPRESSED_RED_GREEN_RGTC2_EXT; |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -2046,6 +2056,7 @@ void R_TextureList_f( void ) |
|
|
|
gEngfuncs.Con_Printf( "DXT5 " ); |
|
|
|
gEngfuncs.Con_Printf( "DXT5 " ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT: |
|
|
|
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT: |
|
|
|
|
|
|
|
case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: |
|
|
|
gEngfuncs.Con_Printf( "ATI2 " ); |
|
|
|
gEngfuncs.Con_Printf( "ATI2 " ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GL_RGBA: |
|
|
|
case GL_RGBA: |
|
|
|