mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +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)
|
void FGLRenderBuffers::RenderEffect(const FString &name)
|
||||||
{
|
{
|
||||||
|
if (hw_postprocess.Effects[name].Size() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
FGLDebug::PushGroup(name.GetChars());
|
FGLDebug::PushGroup(name.GetChars());
|
||||||
|
|
||||||
FGLPostProcessState savedState;
|
FGLPostProcessState savedState;
|
||||||
|
|
|
@ -401,6 +401,7 @@ CVAR(Bool, gl_aalines, false, CVAR_ARCHIVE)
|
||||||
void FGLRenderer::Draw2D(F2DDrawer *drawer)
|
void FGLRenderer::Draw2D(F2DDrawer *drawer)
|
||||||
{
|
{
|
||||||
twoD.Clock();
|
twoD.Clock();
|
||||||
|
FGLDebug::PushGroup("Draw2D");
|
||||||
mBuffers->BindCurrentFB();
|
mBuffers->BindCurrentFB();
|
||||||
const auto &mScreenViewport = screen->mScreenViewport;
|
const auto &mScreenViewport = screen->mScreenViewport;
|
||||||
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
|
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
|
||||||
|
@ -543,5 +544,6 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
|
||||||
gl_RenderState.ResetColor();
|
gl_RenderState.ResetColor();
|
||||||
gl_RenderState.Apply();
|
gl_RenderState.Apply();
|
||||||
delete vb;
|
delete vb;
|
||||||
|
FGLDebug::PopGroup();
|
||||||
twoD.Unclock();
|
twoD.Unclock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue