- add GL debug group for the 2D drawer

- remove pointless opengl calls from effects that are doing nothing
This commit is contained in:
Magnus Norddahl 2018-06-30 15:41:12 +02:00
commit ba09af7cbb
2 changed files with 5 additions and 0 deletions

View file

@ -401,6 +401,7 @@ CVAR(Bool, gl_aalines, false, CVAR_ARCHIVE)
void FGLRenderer::Draw2D(F2DDrawer *drawer)
{
twoD.Clock();
FGLDebug::PushGroup("Draw2D");
mBuffers->BindCurrentFB();
const auto &mScreenViewport = screen->mScreenViewport;
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
@ -543,5 +544,6 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
gl_RenderState.ResetColor();
gl_RenderState.Apply();
delete vb;
FGLDebug::PopGroup();
twoD.Unclock();
}