mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
parent
41a2a63efd
commit
59eb923c11
2 changed files with 2 additions and 2 deletions
|
@ -1006,7 +1006,6 @@ bool PickTexture(int picnum, FGameTexture* tex, int paletteid, TexturePick& pick
|
|||
if (picnum == -1) picnum = TileFiles.GetTileIndex(tex); // Allow getting replacements also when the texture is not passed by its tile number.
|
||||
|
||||
if (!tex->isValid() || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return false;
|
||||
pick.texture = tex;
|
||||
int usepalette = GetTranslationType(paletteid) - Translation_Remap;
|
||||
int usepalswap = GetTranslationIndex(paletteid);
|
||||
int TextureType = hw_int_useindexedcolortextures && picnum >= 0 ? TT_INDEXED : TT_TRUECOLOR;
|
||||
|
@ -1061,6 +1060,7 @@ bool PickTexture(int picnum, FGameTexture* tex, int paletteid, TexturePick& pick
|
|||
pick.tintFlags = -1;
|
||||
pick.tintColor = 0xffffff;
|
||||
}
|
||||
pick.texture = tex;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sa
|
|||
SetBasepalTint(texpick.basepalTint);
|
||||
auto &mat = renderState.mMaterial;
|
||||
int flags = hw_useindexedcolortextures ? CTF_Indexed : 0;
|
||||
mat.mMaterial = FMaterial::ValidateTexture(tex, flags); // todo allow scaling
|
||||
mat.mMaterial = FMaterial::ValidateTexture(texpick.texture, flags); // todo allow scaling
|
||||
mat.mClampMode = sampler;
|
||||
mat.mTranslation = texpick.translation;
|
||||
mat.mOverrideShader = 0;
|
||||
|
|
Loading…
Reference in a new issue