- moved all variables not related to the hardware renderer's texture state out of gl_info.
This commit is contained in:
parent
1fc4c9801b
commit
d01bc452ba
12 changed files with 54 additions and 61 deletions
|
|
@ -48,11 +48,11 @@ int gl_CheckSpriteGlow(sector_t *sector, int lightlevel, const DVector3 &pos)
|
|||
FTexture *tex = TexMan[sector->GetTexture(sector_t::floor)];
|
||||
if (tex != NULL && tex->isGlowing())
|
||||
{
|
||||
if (!tex->gl_info.bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::floor));
|
||||
if (!tex->bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::floor));
|
||||
if (tex->isGlowing()) // recheck the current animation frame.
|
||||
{
|
||||
tex->GetGlowColor(bottomglowcolor);
|
||||
bottomglowcolor[3] = (float)tex->gl_info.GlowHeight;
|
||||
bottomglowcolor[3] = (float)tex->GlowHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -93,12 +93,12 @@ bool gl_GetWallGlow(sector_t *sector, float *topglowcolor, float *bottomglowcolo
|
|||
FTexture *tex = TexMan[sector->GetTexture(sector_t::ceiling)];
|
||||
if (tex != NULL && tex->isGlowing())
|
||||
{
|
||||
if (!tex->gl_info.bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::ceiling));
|
||||
if (!tex->bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::ceiling));
|
||||
if (tex->isGlowing()) // recheck the current animation frame.
|
||||
{
|
||||
ret = true;
|
||||
tex->GetGlowColor(topglowcolor);
|
||||
topglowcolor[3] = (float)tex->gl_info.GlowHeight;
|
||||
topglowcolor[3] = (float)tex->GlowHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -117,12 +117,12 @@ bool gl_GetWallGlow(sector_t *sector, float *topglowcolor, float *bottomglowcolo
|
|||
FTexture *tex = TexMan[sector->GetTexture(sector_t::floor)];
|
||||
if (tex != NULL && tex->isGlowing())
|
||||
{
|
||||
if (!tex->gl_info.bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::floor));
|
||||
if (!tex->bAutoGlowing) tex = TexMan(sector->GetTexture(sector_t::floor));
|
||||
if (tex->isGlowing()) // recheck the current animation frame.
|
||||
{
|
||||
ret = true;
|
||||
tex->GetGlowColor(bottomglowcolor);
|
||||
bottomglowcolor[3] = (float)tex->gl_info.GlowHeight;
|
||||
bottomglowcolor[3] = (float)tex->GlowHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,8 +158,8 @@ public:
|
|||
mTempTM = TM_MODULATE;
|
||||
}
|
||||
mEffectState = overrideshader >= 0? overrideshader : mat->mShaderIndex;
|
||||
mShaderTimer = mat->tex->gl_info.shaderspeed;
|
||||
SetSpecular(mat->tex->gl_info.Glossiness, mat->tex->gl_info.SpecularLevel);
|
||||
mShaderTimer = mat->tex->shaderspeed;
|
||||
SetSpecular(mat->tex->Glossiness, mat->tex->SpecularLevel);
|
||||
mat->Bind(clampmode, translation);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ void GLSkyPortal::DrawContents()
|
|||
drawer->SetupView(0, 0, 0, r_viewpoint.Angles.Yaw, !!(MirrorFlag & 1), !!(PlaneMirrorFlag & 1));
|
||||
|
||||
gl_RenderState.SetVertexBuffer(GLRenderer->mSkyVBO);
|
||||
if (origin->texture[0] && origin->texture[0]->tex->gl_info.bSkybox)
|
||||
if (origin->texture[0] && origin->texture[0]->tex->bSkybox)
|
||||
{
|
||||
RenderBox(origin->skytexno1, origin->texture[0], origin->x_offset[0], origin->sky2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -940,7 +940,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
// allow disabling of the fullbright flag by a brightmap definition
|
||||
// (e.g. to do the gun flashes of Doom's zombies correctly.
|
||||
fullbright = (thing->flags5 & MF5_BRIGHT) ||
|
||||
((thing->renderflags & RF_FULLBRIGHT) && (!gltexture || !gltexture->tex->gl_info.bDisableFullbright));
|
||||
((thing->renderflags & RF_FULLBRIGHT) && (!gltexture || !gltexture->tex->bDisableFullbright));
|
||||
|
||||
lightlevel = fullbright ? 255 :
|
||||
gl_ClampLight(rendersector->GetTexture(sector_t::ceiling) == skyflatnum ?
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ static bool isBright(DPSprite *psp)
|
|||
{
|
||||
FMaterial * tex = FMaterial::ValidateTexture(lump, false, false);
|
||||
if (tex)
|
||||
disablefullbright = tex->tex->gl_info.bDisableFullbright;
|
||||
disablefullbright = tex->tex->bDisableFullbright;
|
||||
}
|
||||
return psp->GetState()->GetFullbright() && !disablefullbright;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ FHardwareTexture *FGLTexture::CreateHwTexture()
|
|||
if (tex->UseType==ETextureType::Null) return NULL; // Cannot register a NULL texture
|
||||
if (mHwTexture == NULL)
|
||||
{
|
||||
mHwTexture = new FHardwareTexture(tex->gl_info.bNoCompress);
|
||||
mHwTexture = new FHardwareTexture(tex->bNoCompress);
|
||||
}
|
||||
return mHwTexture;
|
||||
}
|
||||
|
|
@ -314,21 +314,21 @@ FMaterial::FMaterial(FTexture * tx, bool expanded)
|
|||
if (tx->bWarped)
|
||||
{
|
||||
mShaderIndex = tx->bWarped; // This picks SHADER_Warp1 or SHADER_Warp2
|
||||
tx->gl_info.shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
||||
tx->shaderspeed = static_cast<FWarpTexture*>(tx)->GetSpeed();
|
||||
}
|
||||
else if (tx->bHasCanvas)
|
||||
{
|
||||
if (tx->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||
if (tx->shaderindex >= FIRST_USER_SHADER)
|
||||
{
|
||||
mShaderIndex = tx->gl_info.shaderindex;
|
||||
mShaderIndex = tx->shaderindex;
|
||||
}
|
||||
// no brightmap for cameratexture
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tx->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||
if (tx->shaderindex >= FIRST_USER_SHADER)
|
||||
{
|
||||
mShaderIndex = tx->gl_info.shaderindex;
|
||||
mShaderIndex = tx->shaderindex;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -763,7 +763,7 @@ again:
|
|||
{
|
||||
if (expand)
|
||||
{
|
||||
if (tex->bWarped || tex->bHasCanvas || tex->gl_info.shaderindex >= FIRST_USER_SHADER)
|
||||
if (tex->bWarped || tex->bHasCanvas || tex->shaderindex >= FIRST_USER_SHADER || (tex->shaderindex >= SHADER_Specular && tex->shaderindex <= SHADER_PBRBrightmap))
|
||||
{
|
||||
tex->gl_info.bNoExpand = true;
|
||||
goto again;
|
||||
|
|
|
|||
|
|
@ -123,17 +123,7 @@ int TexFormat[]={
|
|||
|
||||
FTexture::MiscGLInfo::MiscGLInfo() throw()
|
||||
{
|
||||
GlowHeight = 128;
|
||||
bSkybox = false;
|
||||
bFullbright = false;
|
||||
bDisableFullbright = false;
|
||||
bNoFilter = false;
|
||||
bNoCompress = false;
|
||||
bNoExpand = false;
|
||||
shaderspeed = 1.f;
|
||||
shaderindex = 0;
|
||||
Glossiness = 10.0f;
|
||||
SpecularLevel = 0.1f;
|
||||
|
||||
Material[1] = Material[0] = NULL;
|
||||
SystemTexture[1] = SystemTexture[0] = NULL;
|
||||
|
|
@ -222,7 +212,7 @@ void gl_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
|
|||
if (texhitlist[i] & (FTextureManager::HIT_Sky | FTextureManager::HIT_Wall))
|
||||
{
|
||||
FTexture *tex = TexMan.ByIndex(i);
|
||||
if (tex->gl_info.bSkybox)
|
||||
if (tex->bSkybox)
|
||||
{
|
||||
FSkyBox *sb = static_cast<FSkyBox*>(tex);
|
||||
for (int i = 0; i<6; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue