Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-12-27 01:02:31 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-12-27 01:02:31 +0300
commit14d60ca000e11d0a3967ca25ba3b85072869d732 (patch)
tree9a7f39cdd9532d1a77b9d0b9df4d167a61996134 /source/gameengine/GamePlayer/ghost/GPG_Application.cpp
parent7b14c36a1800ade761b8c4b95691ead20748e3ad (diff)
-fixes in player: draw physics debugging, only render frames when actually updated, fix with hierarchies not properly build (causing crashes)
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index fd47df7f770..0d2aa774394 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -435,10 +435,12 @@ bool GPG_Application::processEvent(GHOST_IEvent* event)
m_exitRequested = m_ketsjiengine->GetExitCode();
// kick the engine
- m_ketsjiengine->NextFrame();
-
- // render the frame
- m_ketsjiengine->Render();
+ bool renderFrame = m_ketsjiengine->NextFrame();
+ if (renderFrame)
+ {
+ // render the frame
+ m_ketsjiengine->Render();
+ }
}
m_exitString = m_ketsjiengine->GetExitString();
}
@@ -496,6 +498,9 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0);
bool fixedFr = (G.fileflags & G_FILE_ENABLE_ALL_FRAMES);
+ bool showPhysics = (G.fileflags & G_FILE_SHOW_PHYSICS);
+ SYS_WriteCommandLineInt(syshandle, "show_physics", showPhysics);
+
bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixed_framerate", fixedFr) != 0);
bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 0;