Fixed sky color for tracks without sky domes/boxes when post-processing is enabled

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9356 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
funto66 2011-07-25 22:21:17 +00:00
parent 85096f80bf
commit 9bd62dfe13

View File

@ -1199,8 +1199,13 @@ void IrrDriver::update(float dt)
bool back_buffer_clear = inRace && (world->getPhysics()->isDebug() ||
world->clearBackBuffer() );
if (world != NULL)
if (inRace)
{
// Start the RTT for post-processing.
// We do this before beginScene() because we want to capture the glClear()
// because of tracks that do not have skyboxes (generally add-on tracks)
m_post_processing.beginCapture();
m_video_driver->beginScene(back_buffer_clear,
true, world->getClearColor());
}
@ -1230,9 +1235,6 @@ void IrrDriver::update(float dt)
if (inRace)
{
// Start the RTT for post-processing
m_post_processing.beginCapture();
irr_driver->getVideoDriver()->enableMaterial2D();
RaceGUIBase *rg = world->getRaceGUI();