Browse Source

Apply 4529 update

pull/2/head
Alibek Omarov 5 years ago
parent
commit
2e2949b180
  1. 1
      engine/client/gl_export.h
  2. 13
      engine/client/gl_image.c
  3. 2
      engine/common/build.c

1
engine/client/gl_export.h

@ -392,6 +392,7 @@ typedef float GLmatrix[16]; @@ -392,6 +392,7 @@ typedef float GLmatrix[16];
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837
#define GL_COMPRESSED_ALPHA_ARB 0x84E9
#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB

13
engine/client/gl_image.c

@ -397,6 +397,8 @@ static size_t GL_CalcTextureSize( GLenum format, int width, int height, int dept @@ -397,6 +397,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_DXT5_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;
break;
case GL_RGBA8:
@ -452,10 +454,14 @@ static size_t GL_CalcTextureSize( GLenum format, int width, int height, int dept @@ -452,10 +454,14 @@ static size_t GL_CalcTextureSize( GLenum format, int width, int height, int dept
size = width * height * depth * 8;
break;
case GL_RGB16F_ARB:
size = width * height * depth * 6;
break;
case GL_RGBA16F_ARB:
size = width * height * depth * 8;
break;
case GL_RGB32F_ARB:
size = width * height * depth * 12;
break;
case GL_RGBA32F_ARB:
size = width * height * depth * 16;
break;
@ -662,7 +668,11 @@ static void GL_SetTextureFormat( gl_texture_t *tex, pixformat_t format, int chan @@ -662,7 +668,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_DXT3: tex->format = GL_COMPRESSED_RGBA_S3TC_DXT3_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;
}
@ -2060,6 +2070,7 @@ void R_TextureList_f( void ) @@ -2060,6 +2070,7 @@ void R_TextureList_f( void )
Con_Printf( "DXT5 " );
break;
case GL_COMPRESSED_RED_GREEN_RGTC2_EXT:
case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
Con_Printf( "ATI2 " );
break;
case GL_RGBA:

2
engine/common/build.c

@ -48,6 +48,6 @@ int Q_buildnum( void ) @@ -48,6 +48,6 @@ int Q_buildnum( void )
return b;
#else
return 4511;
return 4529;
#endif
}
Loading…
Cancel
Save