smol change to GL_DrawWaterPolygon

this doesent need anything, its basically just a blank polygon, so can save some work and also pass less stuff to this
This commit is contained in:
alufolie91 committed 2026-07-16 20:20:45 +02:00
1 parent 1a7dc425d2
commit afb5b717fe
3 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ void GL_EnableStencilTest(void);
void GL_DisableStencilTest(void);
void GL_DrawPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags);
void GL_DrawWaterPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags);
void GL_DrawWaterPolygon(FOutVector *pOutVerts, FUINT iNumPts);
void GL_DrawIndexedTriangles(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray);
void GL_Draw2DLine(F2DCoord *v1, F2DCoord *v2, RGBA_t Color);
+1 -3
View File
@@ -817,7 +817,6 @@ static void HWR_RenderPlane(subsector_t *subsector, extrasubsector_t *xsub, bool
// but i hate messing with that
static void HWR_RenderRefractionPlane(subsector_t *subsector, extrasubsector_t *xsub, boolean isceiling, fixed_t fixedheight, sector_t *FOFsector)
{
FSurfaceInfo Surf = {};
FOutVector *v3d;
polyvertex_t *pv;
pslope_t *slope = NULL;
@@ -879,8 +878,7 @@ static void HWR_RenderRefractionPlane(subsector_t *subsector, extrasubsector_t *
for (i = 0, v3d = planeVerts; i < (INT32)nrPlaneVerts; i++, v3d++, pv++)
SETUP3DVERT(v3d, pv->x, pv->y);
// this does not need PF_Occlude or smth, treat it as if it wasnt there at all lol
GL_DrawWaterPolygon(&Surf, planeVerts, nrPlaneVerts, PF_NoTexture|PF_Ripple); // this does not need a texture
GL_DrawWaterPolygon(planeVerts, nrPlaneVerts);
//FIXME: horizonlines with fofs dont work in gl for some reason!
(void)subsector;
+5 -2
View File
@@ -2498,7 +2498,7 @@ void GL_DrawPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, F
Clamp2D(GL_TEXTURE_WRAP_T);
}
void GL_DrawWaterPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags)
void GL_DrawWaterPolygon(FOutVector *pOutVerts, FUINT iNumPts)
{
GL_SetShader(HWR_GetShaderFromTarget(SHADER_WATERREFRACT));
@@ -2510,7 +2510,10 @@ void GL_DrawWaterPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumP
pglBindTexture(GL_TEXTURE_2D, sceneTextures[SCENE_DEPTHTEX]);
pglActiveTexture(GL_TEXTURE0);
GL_DrawPolygon(pSurf, pOutVerts, iNumPts, PolyFlags);
GL_PreparePolygon(NULL, PF_NoTexture|PF_Ripple);
pglVertexPointer(3, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].x);
pglDrawArrays(GL_TRIANGLE_FAN, 0, iNumPts);
}
void GL_DrawIndexedTriangles(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray)