mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- add GL debug group for the 2D drawer
- remove pointless opengl calls from effects that are doing nothing
This commit is contained in:
parent
723b18f2cd
commit
ba09af7cbb
2 changed files with 5 additions and 0 deletions
|
@ -833,6 +833,9 @@ void FGLRenderBuffers::CompileEffectShaders()
|
|||
|
||||
void FGLRenderBuffers::RenderEffect(const FString &name)
|
||||
{
|
||||
if (hw_postprocess.Effects[name].Size() == 0)
|
||||
return;
|
||||
|
||||
FGLDebug::PushGroup(name.GetChars());
|
||||
|
||||
FGLPostProcessState savedState;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue