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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -238,9 +238,6 @@ int WaterManager::LoadWaterTextures()
|
||||
|
||||
// Create the water framebuffers
|
||||
|
||||
GLint currentFbo;
|
||||
glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, ¤tFbo);
|
||||
|
||||
m_ReflectionFbo = 0;
|
||||
glGenFramebuffersEXT(1, &m_ReflectionFbo);
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_ReflectionFbo);
|
||||
@@ -288,7 +285,7 @@ int WaterManager::LoadWaterTextures()
|
||||
UpdateQuality();
|
||||
}
|
||||
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, currentFbo);
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
|
||||
// Enable rendering, now that we've succeeded this far
|
||||
m_RenderWater = true;
|
||||
|
||||
@@ -505,8 +505,6 @@ void ActorViewer::Render()
|
||||
// Set simulation context for rendering purposes
|
||||
g_Renderer.GetSceneRenderer().SetSimulation(&m.Simulation2);
|
||||
|
||||
g_Renderer.BeginFrame();
|
||||
|
||||
// Find the centre of the interesting region, in the middle of the patch
|
||||
// and half way up the model (assuming there is one)
|
||||
CVector3D centre;
|
||||
@@ -523,6 +521,8 @@ void ActorViewer::Render()
|
||||
|
||||
g_Renderer.GetSceneRenderer().SetSceneCamera(camera, camera);
|
||||
|
||||
g_Renderer.BeginFrame();
|
||||
|
||||
g_Renderer.GetSceneRenderer().RenderScene(g_Renderer.GetDeviceCommandContext(), m);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
Reference in New Issue
Block a user