Add support for uncompressed image upload flag to OpenGL1
This commit is contained in:
parent
fad66ae222
commit
ce35188acd
1 changed files with 4 additions and 2 deletions
|
@ -557,6 +557,7 @@ static void Upload32( unsigned *data,
|
||||||
qboolean mipmap,
|
qboolean mipmap,
|
||||||
qboolean picmip,
|
qboolean picmip,
|
||||||
qboolean lightMap,
|
qboolean lightMap,
|
||||||
|
qboolean allowCompression,
|
||||||
int *format,
|
int *format,
|
||||||
int *pUploadWidth, int *pUploadHeight )
|
int *pUploadWidth, int *pUploadHeight )
|
||||||
{
|
{
|
||||||
|
@ -692,11 +693,11 @@ static void Upload32( unsigned *data,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( glConfig.textureCompression == TC_S3TC_ARB )
|
if ( allowCompression && glConfig.textureCompression == TC_S3TC_ARB )
|
||||||
{
|
{
|
||||||
internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
||||||
}
|
}
|
||||||
else if ( glConfig.textureCompression == TC_S3TC )
|
else if ( allowCompression && glConfig.textureCompression == TC_S3TC )
|
||||||
{
|
{
|
||||||
internalFormat = GL_RGB4_S3TC;
|
internalFormat = GL_RGB4_S3TC;
|
||||||
}
|
}
|
||||||
|
@ -892,6 +893,7 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height,
|
||||||
image->flags & IMGFLAG_MIPMAP,
|
image->flags & IMGFLAG_MIPMAP,
|
||||||
image->flags & IMGFLAG_PICMIP,
|
image->flags & IMGFLAG_PICMIP,
|
||||||
isLightmap,
|
isLightmap,
|
||||||
|
!(image->flags & IMGFLAG_NO_COMPRESSION),
|
||||||
&image->internalFormat,
|
&image->internalFormat,
|
||||||
&image->uploadWidth,
|
&image->uploadWidth,
|
||||||
&image->uploadHeight );
|
&image->uploadHeight );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue