- fixed: The alpha channel of translucent textures must be disabled on one-sided walls.

- fixed: Camera textures never initialized their translucency status.
- fixed: The GL texture classes set up incorrect references to the owning texture.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@561 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-18 17:44:53 +00:00
parent 38ded01705
commit e00cd11f51
4 changed files with 18 additions and 14 deletions

View file

@ -123,7 +123,7 @@ void GLWall::PutWall(bool translucent)
4, //RENDERWALL_COLORLAYER // color layer needs special handling
};
if (gltexture && gltexture->GetTransparent())
if (gltexture && gltexture->GetTransparent() && passflag[type] == 2)
{
translucent = true;
}
@ -1493,7 +1493,7 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector,
#ifdef _MSC_VER
#ifdef _DEBUG
if (seg->linedef-lines==14)
if (seg->linedef-lines==11274)
__asm nop
#endif
#endif

View file

@ -57,6 +57,7 @@
EXTERN_CVAR (Bool, r_drawplayersprites)
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR (Bool, st_scale)
//==========================================================================
@ -113,7 +114,7 @@ void FGLRenderer::DrawPSprite (player_t * player,pspdef_t *psp,fixed_t sx, fixed
texturemid = (100<<FRACBITS) - (sy-(tex->GetScaledTopOffset(GLUSE_PATCH)<<FRACBITS));
AWeapon * wi=player->ReadyWeapon;
if (wi && wi->YAdjust && screenblocks>=11) texturemid -= wi->YAdjust;
if (wi && wi->YAdjust && screenblocks>=11 && !st_scale) texturemid -= wi->YAdjust;
scale = ((SCREENHEIGHT*vw)/SCREENWIDTH) / 200.0f;
y1=viewwindowy+(vh>>1)-(int)(((float)texturemid/(float)FRACUNIT)*scale);

View file

@ -567,6 +567,7 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand)
wti.scaley = tx->yScale/(float)FRACUNIT;
if (tx->bHasCanvas) wti.scaley=-wti.scaley;
FTexture *basetex;
if (!expanded)
{
// check if the texture is just a simple redirect to a patch
@ -575,13 +576,13 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand)
// be expanded at the edges this may not be done though.
// Warping can be ignored with SM4 because it's always done
// by shader
tex = tx->GetRedirect(gl.shadermodel < 4);
basetex = tx->GetRedirect(gl.shadermodel < 4);
}
else
{
// a little adjustment to make sprites look better with texture filtering:
// create a 1 pixel wide empty frame around them.
tex = tx;
basetex = tx;
RenderWidth[GLUSE_PATCH]+=2;
RenderHeight[GLUSE_PATCH]+=2;
Width[GLUSE_PATCH]+=2;
@ -591,12 +592,14 @@ FMaterial::FMaterial(FTexture * tx, bool forceexpand)
}
// make sure the system texture is valid
mBaseLayer = ValidateSysTexture(tex, expanded);
mBaseLayer = ValidateSysTexture(basetex, expanded);
mTextureLayers.ShrinkToFit();
mMaxBound = -1;
mMaterials.Push(this);
tx->gl_info.Material = this;
if (tx->bHasCanvas) tx->gl_info.mIsTransparent = 0;
tex = tx;
}
//===========================================================================
@ -638,18 +641,18 @@ const WorldTextureInfo *FMaterial::Bind(int cm, int clampmode, int translation)
{
for(unsigned i=0;i<mTextureLayers.Size();i++)
{
FTexture *tex;
FTexture *layer;
if (mTextureLayers[i].animated)
{
FTextureID id = mTextureLayers[i].texture->GetID();
tex = TexMan(id);
ValidateSysTexture(tex, false);
layer = TexMan(id);
ValidateSysTexture(layer, false);
}
else
{
tex = mTextureLayers[i].texture;
layer = mTextureLayers[i].texture;
}
tex->gl_info.SystemTexture->Bind(i+1, CM_DEFAULT, clampmode, 0, allowhires, false);
layer->gl_info.SystemTexture->Bind(i+1, CM_DEFAULT, clampmode, 0, allowhires, false);
maxbound = i+1;
}
}

View file

@ -41,15 +41,15 @@
/** Lots of different version numbers **/
#define DOTVERSIONSTR_NOREV "1.3.1 beta"
#define DOTVERSIONSTR_NOREV "1.3.2 beta"
#define ZDVER_STRING "2.3.1"
// The version string the user actually sees.
#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ") / ZDoom" ZDVER_STRING " (r" ZD_SVN_REVISION_STRING ")"
// The version as seen in the Windows resource
#define RC_FILEVERSION 1,3,1,SVN_REVISION_NUMBER
#define RC_PRODUCTVERSION 1,3,1,0
#define RC_FILEVERSION 1,3,2,SVN_REVISION_NUMBER
#define RC_PRODUCTVERSION 1,3,2,0
#define RC_FILEVERSION2 DOTVERSIONSTR
#define RC_PRODUCTVERSION2 "1.3"