Fix some things regarding Opengl encore visuals #95

Merged
alufolie91 merged 8 commits from gl-noencore-effect-fix into Saturn-Next 2024-02-22 23:35:00 +01:00
4 changed files with 67 additions and 63 deletions

No files matched your search

+9 -12
View File
@@ -321,7 +321,7 @@ bpp = format2bpp(grMipmap->format);
// Create a composite texture from patches, adapt the texture size to a power of 2
// height and width for the hardware texture cache.
//
static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex, boolean noencore)
{
UINT8 *block;
texture_t *texture;
@@ -362,7 +362,7 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
grtex->mipmap.colormap = colormaps;
#ifdef GLENCORE
if (encoremap)
if (encoremap && !noencore)
grtex->mipmap.colormap += (256*32);
#endif
@@ -551,7 +551,7 @@ void HWR_LoadTextures(size_t pnumtextures)
HWR_FreeTextureCache();
gr_numtextures = pnumtextures;
gr_textures = calloc(pnumtextures, sizeof (*gr_textures));
gr_textures = calloc(pnumtextures, sizeof (*gr_textures)*2); // *2 - 1 for encore-remapped texture and another for noencore texture (unused when not in encore)
if (gr_textures == NULL)
I_Error("HWR_LoadTextures: ran out of memory for OpenGL textures. Sad!");
}
@@ -559,10 +559,10 @@ void HWR_LoadTextures(size_t pnumtextures)
// --------------------------------------------------------------------------
// Make sure texture is downloaded and set it as the source
// --------------------------------------------------------------------------
GLMapTexture_t *HWR_GetTexture(INT32 tex)
GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore)
{
GLMapTexture_t *grtex;
if (tex < 0 || tex >= (signed)gr_numtextures)
{
#ifdef PARANOIA
@@ -571,16 +571,16 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex)
tex = 0;
#endif
}
grtex = &gr_textures[tex];
grtex = &gr_textures[tex*2 + (encoremap && !noencore ? 0 : 1)];
if (!grtex->mipmap.data && !grtex->mipmap.downloaded)
HWR_GenerateTexture(tex, grtex);
HWR_GenerateTexture(tex, grtex, noencore);
// If hardware does not have the texture, then call pfnSetTexture to upload it
if (!grtex->mipmap.downloaded)
HWD.pfnSetTexture(&grtex->mipmap);
HWR_SetCurrentTexture(&grtex->mipmap);
// The system-memory data can be purged now.
@@ -589,7 +589,6 @@ GLMapTexture_t *HWR_GetTexture(INT32 tex)
return grtex;
}
static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
{
#ifdef GLENCORE
@@ -598,7 +597,6 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
#endif
size_t size, pflatsize;
// setup the texture info
grMipmap->format = GL_TEXFMT_P_8;
grMipmap->flags = TF_WRAPXY|TF_CHROMAKEYED;
@@ -644,7 +642,6 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
#endif
}
// Download a Doom 'flat' to the hardware cache and make it ready for use
void HWR_GetFlat(lumpnum_t flatlumpnum, boolean noencoremap)
{
+3 -3
View File
@@ -63,7 +63,7 @@ void HWR_FreeExtraSubsectors(void);
void HWR_GetFlat(lumpnum_t flatlumpnum, boolean noencoremap);
// ^ some flats must NOT be remapped to encore, since we remap them as we cache them for ease, adding a toggle here seems wise.
GLMapTexture_t *HWR_GetTexture(INT32 tex);
GLMapTexture_t *HWR_GetTexture(INT32 tex, boolean noencore);
void HWR_GetPatch(GLPatch_t *gpatch);
void HWR_GetMappedPatch(GLPatch_t *gpatch, const UINT8 *colormap);
void HWR_MakePatch(patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
@@ -87,7 +87,7 @@ extern INT32 textureformat;
// --------
// hw_main.c // originally hw_drawnodes.c from HWPortal branch
// --------
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, INT32 texnum, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap);
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, INT32 texnum, boolean noencore, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap);
void HWR_AddTransparentFloor(lumpnum_t lumpnum, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight, INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, boolean fogplane, extracolormap_t *planecolormap);
void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector, boolean isceiling, fixed_t fixedheight,
INT32 lightlevel, INT32 alpha, sector_t *FOFSector, FBITFIELD blend, extracolormap_t *planecolormap);
@@ -108,4 +108,4 @@ const char *HWR_GetShaderName(INT32 shader);
extern customshaderxlat_t shaderxlat[];
#endif //_HW_GLOB_
#endif //_HW_GLOB_
+54 -47
View File
@@ -248,7 +248,7 @@ static line_t *gr_linedef;
static sector_t *gr_frontsector;
static sector_t *gr_backsector;
static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor, FBITFIELD polyflags);
static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, boolean noencore, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor, FBITFIELD polyflags);
// Performance stats
ps_metric_t ps_hw_nodesorttime = {0};
@@ -1068,7 +1068,7 @@ void HWR_ProjectWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, FBITFIELD blend
//
// SoM: split up and light walls according to the lightlist.
// This may also include leaving out parts of the wall that can't be seen
static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor, FBITFIELD polyflags)
static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, boolean noencore, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor, FBITFIELD polyflags)
{
float realtop, realbot, top, bot;
float pegt, pegb, pegmul;
@@ -1299,16 +1299,16 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
if (cv_fofzfightfix.value)
{
if (cutflag & FF_FOG)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
else if (cutflag & FF_TRANSLUCENT)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Translucent|polyflags, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Translucent|polyflags, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, Surf, PF_Masked|polyflags, lightnum, colormap);
}else{
if (cutflag & FF_FOG)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Fog|PF_NoTexture, true, lightnum, colormap);
else if (cutflag & FF_TRANSLUCENT)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Translucent, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Translucent, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, Surf, PF_Masked, lightnum, colormap);
}
@@ -1353,16 +1353,16 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
if (cv_fofzfightfix.value)
{
if (cutflag & FF_FOG)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap);
else if (cutflag & FF_TRANSLUCENT)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Translucent|polyflags, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Translucent|polyflags, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, Surf, PF_Masked|polyflags, lightnum, colormap);
}else{
if (cutflag & FF_FOG)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Fog|PF_NoTexture, true, lightnum, colormap);
else if (cutflag & FF_TRANSLUCENT)
HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Translucent, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, Surf, texnum, noencore, PF_Translucent, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, Surf, PF_Masked, lightnum, colormap);
}
@@ -1475,6 +1475,8 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
FUINT lightnum = 0; // shut up compiler
extracolormap_t *colormap;
FSurfaceInfo Surf;
boolean noencore = false;
gr_sidedef = gr_curline->sidedef;
gr_linedef = gr_curline->linedef;
@@ -1550,7 +1552,10 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
lightnum = HWR_CalcWallLight(gr_frontsector->lightlevel, vs.x, vs.y, ve.x, ve.y);
colormap = gr_frontsector->extra_colormap;
}
if (gr_linedef->flags & ML_TFERLINE)
noencore = true;
if (gr_frontsector)
Surf.PolyColor.s.alpha = 255;
@@ -1695,7 +1700,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{
fixed_t texturevpegtop; // top
grTex = HWR_GetTexture(gr_toptexture);
grTex = HWR_GetTexture(gr_toptexture, gr_linedef->flags & ML_TFERLINE);
// PEGGING
if (gr_linedef->flags & ML_DONTPEGTOP)
@@ -1758,9 +1763,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
#endif
if (!gl_drawing_stencil && gr_frontsector->numlights)
HWR_SplitWall(gr_frontsector, wallVerts, gr_toptexture, &Surf, FF_CUTLEVEL, NULL, 0);
HWR_SplitWall(gr_frontsector, wallVerts, gr_toptexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_CUTLEVEL, NULL, 0);
else if (!gl_drawing_stencil && grTex->mipmap.flags & TF_TRANSPARENT)
HWR_AddTransparentWall(wallVerts, &Surf, gr_toptexture, PF_Environment, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, gr_toptexture, gr_linedef->flags & ML_TFERLINE, PF_Environment, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
}
@@ -1775,7 +1780,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
{
fixed_t texturevpegbottom = 0; // bottom
grTex = HWR_GetTexture(gr_bottomtexture);
grTex = HWR_GetTexture(gr_bottomtexture, gr_linedef->flags & ML_TFERLINE);
// PEGGING
#ifdef ESLOPE
@@ -1840,9 +1845,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
#endif
if (!gl_drawing_stencil && gr_frontsector->numlights)
HWR_SplitWall(gr_frontsector, wallVerts, gr_bottomtexture, &Surf, FF_CUTLEVEL, NULL, 0);
HWR_SplitWall(gr_frontsector, wallVerts, gr_bottomtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_CUTLEVEL, NULL, 0);
else if (!gl_drawing_stencil && grTex->mipmap.flags & TF_TRANSPARENT)
HWR_AddTransparentWall(wallVerts, &Surf, gr_bottomtexture, PF_Environment, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, gr_bottomtexture, gr_linedef->flags & ML_TFERLINE, PF_Environment, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
}
@@ -1982,15 +1987,15 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
l = max(polybottom, lowcut);
hS = min(highcutslope, polytopslope);
lS = max(polybottomslope, lowcutslope);
// PEGGING
fixed_t texturevpeg, texturevpegslope;
grTex = HWR_GetTexture(gr_midtexture);
grTex = HWR_GetTexture(gr_midtexture, gr_linedef->flags & ML_TFERLINE);
if (cv_slopepegfix.value)
{
if (!!(gr_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gr_linedef->flags & ML_EFFECT3))
{
if (!!(gr_linedef->flags & ML_DONTPEGBOTTOM) ^ !!(gr_linedef->flags & ML_EFFECT3))
{
texturevpeg = midtexheight - h + polybottom;
texturevpegslope = midtexheight - hS + polybottomslope;
@@ -2000,7 +2005,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
texturevpeg = polytop - h;
texturevpegslope = polytopslope - hS;
}
wallVerts[3].t = texturevpeg * grTex->scaleY;
wallVerts[0].t = (h - l + texturevpeg) * grTex->scaleY;
wallVerts[2].t = texturevpegslope * grTex->scaleY;
@@ -2164,22 +2169,22 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
if (cv_fofzfightfix.value)
{
if (!(blendmode & PF_Masked))
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, &Surf, FF_TRANSLUCENT, NULL, PF_Decal);
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_TRANSLUCENT, NULL, PF_Decal);
else
{
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, &Surf, FF_CUTLEVEL, NULL, PF_Decal);
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_CUTLEVEL, NULL, PF_Decal);
}
}else{
if (!(blendmode & PF_Masked))
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, &Surf, FF_TRANSLUCENT, NULL, 0);
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_TRANSLUCENT, NULL, 0);
else
{
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, &Surf, FF_CUTLEVEL, NULL, 0);
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_CUTLEVEL, NULL, 0);
}
}
}
}
else if (!gl_drawing_stencil && !(blendmode & PF_Masked))
HWR_AddTransparentWall(wallVerts, &Surf, gr_midtexture, blendmode, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, gr_midtexture, gr_linedef->flags & ML_TFERLINE, blendmode, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, blendmode, lightnum, colormap);
}
@@ -2204,7 +2209,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
// top of texture at top
texturevpeg = gr_sidedef->rowoffset;
grTex = HWR_GetTexture(gr_midtexture);
grTex = HWR_GetTexture(gr_midtexture, gr_linedef->flags & ML_TFERLINE);
wallVerts[3].t = wallVerts[2].t = texturevpeg * grTex->scaleY;
wallVerts[0].t = wallVerts[1].t = (texturevpeg + gr_frontsector->ceilingheight - gr_frontsector->floorheight) * grTex->scaleY;
@@ -2240,12 +2245,12 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
#endif
if (gr_frontsector->numlights)
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, &Surf, FF_CUTLEVEL, NULL, 0);
HWR_SplitWall(gr_frontsector, wallVerts, gr_midtexture, gr_linedef->flags & ML_TFERLINE, &Surf, FF_CUTLEVEL, NULL, 0);
// I don't think that solid walls can use translucent linedef types...
else
{
if (grTex->mipmap.flags & TF_TRANSPARENT)
HWR_AddTransparentWall(wallVerts, &Surf, gr_midtexture, PF_Environment, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, gr_midtexture, gr_linedef->flags & ML_TFERLINE, PF_Environment, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
}
@@ -2446,7 +2451,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
#endif
}
grTex = HWR_GetTexture(texnum);
grTex = HWR_GetTexture(texnum, noencore);
#ifdef ESLOPE
if (!slopeskew) // no skewing
@@ -2502,9 +2507,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(SOFTLIGHT(rover->master->frontsector->lightlevel), rover->master->frontsector->extra_colormap);
if (gr_frontsector->numlights)
HWR_SplitWall(gr_frontsector, wallVerts, 0, &Surf, rover->flags, rover, 0);
HWR_SplitWall(gr_frontsector, wallVerts, 0, false, &Surf, rover->flags, rover, 0);
else
HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, 0, false, blendmode, true, lightnum, colormap);
}
else
{
@@ -2517,11 +2522,11 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
}
if (gr_frontsector->numlights)
HWR_SplitWall(gr_frontsector, wallVerts, texnum, &Surf, rover->flags, rover, 0);
HWR_SplitWall(gr_frontsector, wallVerts, texnum, noencore, &Surf, rover->flags, rover, 0);
else
{
if (blendmode != PF_Masked)
HWR_AddTransparentWall(wallVerts, &Surf, texnum, blendmode, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, texnum, gr_linedef->flags & ML_TFERLINE, blendmode, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
}
@@ -2617,7 +2622,7 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
}
else
{
grTex = HWR_GetTexture(texnum);
grTex = HWR_GetTexture(texnum, noencore);
if (newline)
{
@@ -2653,9 +2658,9 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(SOFTLIGHT(rover->master->frontsector->lightlevel), rover->master->frontsector->extra_colormap);
if (gr_backsector->numlights)
HWR_SplitWall(gr_backsector, wallVerts, 0, &Surf, rover->flags, rover, 0);
HWR_SplitWall(gr_backsector, wallVerts, 0, false, &Surf, rover->flags, rover, 0);
else
HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, 0, false, blendmode, true, lightnum, colormap);
}
else
{
@@ -2668,11 +2673,11 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
}
if (gr_backsector->numlights)
HWR_SplitWall(gr_backsector, wallVerts, texnum, &Surf, rover->flags, rover, 0);
HWR_SplitWall(gr_backsector, wallVerts, texnum, noencore, &Surf, rover->flags, rover, 0);
else
{
if (blendmode != PF_Masked)
HWR_AddTransparentWall(wallVerts, &Surf, texnum, blendmode, false, lightnum, colormap);
HWR_AddTransparentWall(wallVerts, &Surf, texnum, noencore, blendmode, false, lightnum, colormap);
else
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
}
@@ -4832,6 +4837,7 @@ typedef struct
FOutVector wallVerts[4];
FSurfaceInfo Surf;
INT32 texnum;
boolean noencore;
FBITFIELD blend;
boolean fogwall;
INT32 lightlevel;
@@ -4920,13 +4926,14 @@ static void *HWR_CreateDrawNode(gr_drawnode_type_t type)
return NULL;
}
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, INT32 texnum, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap)
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, INT32 texnum, boolean noencore, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap)
{
wallinfo_t *wallinfo = HWR_CreateDrawNode(DRAWNODE_WALL);
M_Memcpy(wallinfo->wallVerts, wallVerts, sizeof (wallinfo->wallVerts));
M_Memcpy(&wallinfo->Surf, pSurf, sizeof (FSurfaceInfo));
wallinfo->texnum = texnum;
wallinfo->noencore = noencore;
wallinfo->blend = blend;
wallinfo->fogwall = fogwall;
wallinfo->lightlevel = lightlevel;
@@ -5079,7 +5086,7 @@ void HWR_RenderDrawNodes(void)
wallinfo_t *wall = &drawnode->u.wall;
if (!(wall->blend & PF_NoTexture))
HWR_GetTexture(wall->texnum);
HWR_GetTexture(wall->texnum, wall->noencore);
HWR_RenderWall(wall->wallVerts, &wall->Surf, wall->blend, wall->fogwall,
wall->lightlevel, wall->wallcolormap);
}
@@ -5624,7 +5631,7 @@ void HWR_ProjectSprite(mobj_t *thing)
{
vis->colormap = colormaps;
#ifdef GLENCORE
if (encoremap && (thing->flags & (MF_SCENERY|MF_NOTHINK)) && !(thing->flags & MF_DONTENCOREMAP))
if (encoremap && !(thing->flags & MF_DONTENCOREMAP))
vis->colormap += (256*32);
#endif
}
@@ -5805,7 +5812,7 @@ void HWR_DrawSkyBackground(float fpov)
dometransform.roll = atransform.roll;
dometransform.splitscreen = splitscreen;
HWR_GetTexture(texturetranslation[skytexture]);
HWR_GetTexture(texturetranslation[skytexture], false);
if (HWR_UseShader())
HWD.pfnSetShader(HWR_GetShaderFromTarget(SHADER_SKY));// sky shader
HWD.pfnRenderSkyDome(skytexture, textures[skytexture]->width, textures[skytexture]->height, dometransform);
+1 -1
View File
@@ -133,7 +133,7 @@ void HWR_AddTransparentPolyobjectFloor(lumpnum_t lumpnum, polyobj_t *polysector,
void HWR_ProcessSeg(void); // Sort of like GLWall::Process in GZDoom
void HWR_RenderWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap);
void HWR_ProjectWall(FOutVector *wallVerts, FSurfaceInfo *pSurf, FBITFIELD blendmode, INT32 lightlevel, extracolormap_t *wallcolormap);
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo * pSurf, INT32 texnum, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap);
void HWR_AddTransparentWall(FOutVector *wallVerts, FSurfaceInfo * pSurf, INT32 texnum, boolean noencore, FBITFIELD blend, boolean fogwall, INT32 lightlevel, extracolormap_t *wallcolormap);
// moved HWR_SplitWall to hw_main.c
void HWR_DrawSkyWall(FOutVector *wallVerts, FSurfaceInfo *Surf);
void HWR_DrawSkyBackground(float fpov);