1
0
forked from mirrors/0ad

Removes asking GL of current bind framebuffer to avoid syncs.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4422
This was SVN commit r26193.
This commit is contained in:
vladislavbelov
2022-01-09 07:36:56 +00:00
parent 98d213a9cd
commit 795fb070af
3 changed files with 4 additions and 13 deletions
+1 -7
View File
@@ -117,9 +117,6 @@ struct ShadowMapInternals
// BeginRender and EndRender while we replace it with the shadow camera
CCamera SavedViewCamera;
// Save the caller's FBO so it can be restored
GLint SavedViewFBO;
void CalculateShadowMatrices(const int cascade);
void CreateTexture();
void UpdateCascadesParameters();
@@ -488,9 +485,6 @@ void ShadowMapInternals::CreateTexture()
Framebuffer = 0;
}
// save the caller's FBO
glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &SavedViewFBO);
glGenFramebuffersEXT(1, &Framebuffer);
CFG_GET_VAL("shadowquality", QualityLevel);
@@ -605,7 +599,7 @@ void ShadowMapInternals::CreateTexture()
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, SavedViewFBO);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
{