Skip to content

Commit

Permalink
Fixed: Texture content flag NO_COMPRESSION was ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 21, 2012
1 parent bd0001e commit 07f964a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doomsday/engine/portable/src/gl_texmanager.c
Expand Up @@ -1822,11 +1822,11 @@ void GL_UploadTextureContent(const texturecontent_t* content)
{
assert(content);
{
boolean generateMipmaps = ((content->flags & (TXCF_MIPMAP|TXCF_GRAY_MIPMAP)) != 0);
boolean allowCompression = ((content->flags & TXCF_NO_COMPRESSION) == 0);
boolean applyTexGamma = ((content->flags & TXCF_APPLY_GAMMACORRECTION) != 0);
boolean noSmartFilter = ((content->flags & TXCF_UPLOAD_ARG_NOSMARTFILTER) != 0);
boolean noStretch = ((content->flags & TXCF_UPLOAD_ARG_NOSTRETCH) != 0);
boolean generateMipmaps = ((content->flags & (TXCF_MIPMAP|TXCF_GRAY_MIPMAP)) != 0);
boolean applyTexGamma = ((content->flags & TXCF_APPLY_GAMMACORRECTION) != 0);
boolean noCompression = ((content->flags & TXCF_NO_COMPRESSION) != 0);
boolean noSmartFilter = ((content->flags & TXCF_UPLOAD_ARG_NOSMARTFILTER) != 0);
boolean noStretch = ((content->flags & TXCF_UPLOAD_ARG_NOSTRETCH) != 0);
int loadWidth = content->width, loadHeight = content->height;
const uint8_t* loadPixels = content->pixels;
dgltexformat_t dglFormat = content->format;
Expand Down Expand Up @@ -2026,7 +2026,7 @@ void GL_UploadTextureContent(const texturecontent_t* content)
exit(1);
}

glFormat = ChooseTextureFormat(dglFormat, allowCompression);
glFormat = ChooseTextureFormat(dglFormat, !noCompression);

if(!GL_UploadTexture(glFormat, loadFormat, loadPixels, loadWidth, loadHeight,
generateMipmaps ? true : false))
Expand All @@ -2048,7 +2048,7 @@ void GL_UploadTextureContent(const texturecontent_t* content)
exit(1); // Unreachable.
}

glFormat = ChooseTextureFormat(DGL_LUMINANCE, allowCompression);
glFormat = ChooseTextureFormat(DGL_LUMINANCE, !noCompression);

if(!GL_UploadTextureGrayMipmap(glFormat, loadFormat, loadPixels, loadWidth, loadHeight,
content->grayMipmap * reciprocal255))
Expand Down

0 comments on commit 07f964a

Please sign in to comment.