On modern hw, you do want to always clear at the start of frame.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12842 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -1589,7 +1589,7 @@ void IrrDriver::update(float dt)
|
||||
// =====================================================
|
||||
if (world && world->getNumKarts() == 0)
|
||||
{
|
||||
m_video_driver->beginScene(/*backBuffer clear*/false, /*zBuffer*/true,
|
||||
m_video_driver->beginScene(/*backBuffer clear*/true, /*zBuffer*/true,
|
||||
world->getClearColor());
|
||||
m_scene_manager->drawAll();
|
||||
GUIEngine::render(dt);
|
||||
@@ -1600,7 +1600,7 @@ void IrrDriver::update(float dt)
|
||||
GUIEngine::getCurrentScreen()->needs3D())
|
||||
{
|
||||
//printf("Screen that needs 3D\n");
|
||||
m_video_driver->beginScene(/*backBuffer clear*/false, /*zBuffer*/true,
|
||||
m_video_driver->beginScene(/*backBuffer clear*/true, /*zBuffer*/true,
|
||||
video::SColor(0,0,0,255));
|
||||
m_scene_manager->drawAll();
|
||||
GUIEngine::render(dt);
|
||||
@@ -1610,11 +1610,6 @@ void IrrDriver::update(float dt)
|
||||
|
||||
const bool inRace = world!=NULL;
|
||||
|
||||
// With bullet debug view we have to clear the back buffer, but
|
||||
// that's not necessary for non-debug
|
||||
bool back_buffer_clear = inRace && (world->getPhysics()->isDebug() ||
|
||||
world->clearBackBuffer() );
|
||||
|
||||
if (inRace)
|
||||
{
|
||||
// Start the RTT for post-processing.
|
||||
@@ -1623,7 +1618,7 @@ void IrrDriver::update(float dt)
|
||||
m_post_processing->beginCapture();
|
||||
}
|
||||
|
||||
m_video_driver->beginScene(back_buffer_clear, /*zBuffer*/ true,
|
||||
m_video_driver->beginScene(/*backBuffer clear*/ true, /*zBuffer*/ true,
|
||||
world ? world->getClearColor()
|
||||
: video::SColor(255,100,101,140));
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ World::World() : WorldStatus(), m_clear_color(255,100,101,140)
|
||||
m_saved_race_gui = NULL;
|
||||
m_use_highscores = true;
|
||||
m_track = NULL;
|
||||
m_clear_back_buffer = false;
|
||||
m_schedule_pause = false;
|
||||
m_schedule_unpause = false;
|
||||
m_schedule_exit_race = false;
|
||||
|
||||
@@ -123,8 +123,6 @@ protected:
|
||||
there are scene nodes). */
|
||||
RaceGUIBase *m_saved_race_gui;
|
||||
|
||||
bool m_clear_back_buffer;
|
||||
|
||||
irr::video::SColor m_clear_color;
|
||||
|
||||
/** Pausing/unpausing are not done immediately, but at next udpdate. The
|
||||
@@ -297,9 +295,6 @@ public:
|
||||
/** \return whether this world can generate/have highscores */
|
||||
bool useHighScores() const { return m_use_highscores; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns if this mode needs to clear the back buffer. */
|
||||
bool clearBackBuffer() const { return m_clear_back_buffer; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the color to clear the back buffer. */
|
||||
const irr::video::SColor& getClearColor() const { return m_clear_color; }
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -307,7 +302,6 @@ public:
|
||||
void setClearbackBufferColor(irr::video::SColor color)
|
||||
{
|
||||
m_clear_color = color;
|
||||
m_clear_back_buffer = true;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
/** Override if you want to know when a kart presses fire */
|
||||
|
||||
Reference in New Issue
Block a user