mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- use MakeVertices directly in the portal code and remove all related code from RenderWall.
This commit is contained in:
parent
8cf53f04e8
commit
8f331f56e2
4 changed files with 10 additions and 22 deletions
|
@ -773,7 +773,7 @@ void GLWall::RenderLightsCompat(int pass)
|
|||
if (PrepareLight(light, pass))
|
||||
{
|
||||
vertcount = 0;
|
||||
RenderWall(RWF_TEXTURED, NULL);
|
||||
RenderWall(RWF_TEXTURED);
|
||||
}
|
||||
node = node->nextLight;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,9 @@ void GLPortal::DrawPortalStencil()
|
|||
|
||||
for (unsigned int i = 0; i<lines.Size(); i++)
|
||||
{
|
||||
lines[i].RenderWall(GLWall::RWF_NORENDER, &mPrimIndices[i * 2]);
|
||||
if (gl.buffermethod != BM_DEFERRED) lines[i].MakeVertices(false);
|
||||
mPrimIndices[i * 2] = lines[i].vertindex;
|
||||
mPrimIndices[i * 2 + 1] = lines[i].vertcount;
|
||||
}
|
||||
|
||||
if (cap)
|
||||
|
|
|
@ -196,7 +196,7 @@ private:
|
|||
void SetupLights();
|
||||
bool PrepareLight(ADynamicLight * light, int pass);
|
||||
void MakeVertices(bool nosplit);
|
||||
void RenderWall(int textured, unsigned int *store = NULL);
|
||||
void RenderWall(int textured);
|
||||
void RenderTextured(int rflags);
|
||||
|
||||
void FloodPlane(int pass);
|
||||
|
|
|
@ -205,30 +205,16 @@ void GLWall::MakeVertices(bool nosplit)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void GLWall::RenderWall(int textured, unsigned int *store)
|
||||
void GLWall::RenderWall(int textured)
|
||||
{
|
||||
if (!(textured & RWF_NORENDER))
|
||||
{
|
||||
gl_RenderState.Apply();
|
||||
gl_RenderState.ApplyLightIndex(dynlightindex);
|
||||
}
|
||||
|
||||
gl_RenderState.Apply();
|
||||
gl_RenderState.ApplyLightIndex(dynlightindex);
|
||||
if (gl.buffermethod != BM_DEFERRED)
|
||||
{
|
||||
MakeVertices(!(textured&RWF_NOSPLIT));
|
||||
}
|
||||
|
||||
unsigned int count = vertcount, offset = vertindex;
|
||||
if (!(textured & RWF_NORENDER))
|
||||
{
|
||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, offset, count);
|
||||
vertexcount += count;
|
||||
}
|
||||
if (store != NULL)
|
||||
{
|
||||
store[0] = offset;
|
||||
store[1] = count;
|
||||
}
|
||||
GLRenderer->mVBO->RenderArray(GL_TRIANGLE_FAN, vertindex, vertcount);
|
||||
vertexcount += vertcount;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue