- fixed: the translucency flag for the flags renderer was inconsistent between the light pass and the render pass on GL 3.x hardware, resulting in bad buffer indices being sent to the shader.

This commit is contained in:
Christoph Oelckers 2014-11-09 12:10:33 +01:00
parent 48fbab819b
commit b0a6c94fa4
3 changed files with 4 additions and 4 deletions

View file

@ -771,11 +771,11 @@ void GLDrawList::DrawSorted()
// //
// //
//========================================================================== //==========================================================================
void GLDrawList::Draw(int pass) void GLDrawList::Draw(int pass, bool trans)
{ {
for(unsigned i=0;i<drawitems.Size();i++) for(unsigned i=0;i<drawitems.Size();i++)
{ {
DoDraw(pass, i, false); DoDraw(pass, i, trans);
} }
} }

View file

@ -125,7 +125,7 @@ public:
void DoDraw(int pass, int index, bool trans); void DoDraw(int pass, int index, bool trans);
void DoDrawSorted(SortNode * node); void DoDrawSorted(SortNode * node);
void DrawSorted(); void DrawSorted();
void Draw(int pass); void Draw(int pass, bool trans = false);
void DrawWalls(int pass); void DrawWalls(int pass);
void DrawFlats(int pass); void DrawFlats(int pass);
void DrawDecals(); void DrawDecals();

View file

@ -361,7 +361,7 @@ void FGLRenderer::RenderScene(int recursion)
gl_drawinfo->drawlists[GLDL_MASKEDFLATS].DrawFlats(GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_MASKEDFLATS].DrawFlats(GLPASS_LIGHTSONLY);
gl_drawinfo->drawlists[GLDL_MASKEDWALLSOFS].DrawWalls(GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_MASKEDWALLSOFS].DrawWalls(GLPASS_LIGHTSONLY);
gl_drawinfo->drawlists[GLDL_TRANSLUCENTBORDER].Draw(GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_TRANSLUCENTBORDER].Draw(GLPASS_LIGHTSONLY);
gl_drawinfo->drawlists[GLDL_TRANSLUCENT].Draw(GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_TRANSLUCENT].Draw(GLPASS_LIGHTSONLY, true);
GLRenderer->mLights->Finish(); GLRenderer->mLights->Finish();
} }