|
From: <axl...@us...> - 2008-12-03 12:22:19
|
Revision: 27
http://hgengine.svn.sourceforge.net/hgengine/?rev=27&view=rev
Author: axlecrusher
Date: 2008-12-03 11:40:01 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
Move viewport into root as a test
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2008-12-03 11:36:27 UTC (rev 26)
+++ Mercury2/src/Mercury2.cpp 2008-12-03 11:40:01 UTC (rev 27)
@@ -20,7 +20,8 @@
vp->Perspective(45,640.0f/480.0f,0.01,100);
root->AddChild(vp);
- vp->AddChild(t);
+ root->AddChild(t);
+// vp->AddChild(t);
t->AddChild(r);
r->AddAsset( q );
r->AddRender( q );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2008-12-04 02:06:37
|
Revision: 40
http://hgengine.svn.sourceforge.net/hgengine/?rev=40&view=rev
Author: axlecrusher
Date: 2008-12-04 02:06:35 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
remove hard coded scene
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2008-12-04 02:01:18 UTC (rev 39)
+++ Mercury2/src/Mercury2.cpp 2008-12-04 02:06:35 UTC (rev 40)
@@ -4,6 +4,8 @@
#include <Viewport.h>
#include <TransformNode.h>
+#include <XMLParser.h>
+
int main()
{
unsigned long m_count = 0;
@@ -11,21 +13,14 @@
MercuryWindow* w = MercuryWindow::MakeWindow();
MercuryNode* root = new MercuryNode();
- Viewport* vp = new Viewport();
- RenderableNode* r = new RenderableNode();
- TransformNode* t = new TransformNode();
- MAutoPtr< MercuryAsset > q( new Quad() );
- t->SetPosition( MercuryPoint(0,0,-3) );
+ XMLDocument* doc = XMLDocument::Load("scenegraph.xml");
- vp->Perspective(45,640.0f/480.0f,0.01,100);
- root->AddChild(vp);
- root->AddChild(t);
-// vp->AddChild(t);
- t->AddChild(r);
- r->AddAsset( q );
- r->AddRender( q );
+ XMLNode r = doc->GetRootNode();
+ root->LoadFromXML( r );
+ SAFE_DELETE(doc);
+
m_time = time(NULL);
do
{
@@ -44,8 +39,8 @@
while ( w->PumpMessages() );
SAFE_DELETE(root);
+ SAFE_DELETE(w);
- delete w;
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2008-12-13 17:28:38
|
Revision: 76
http://hgengine.svn.sourceforge.net/hgengine/?rev=76&view=rev
Author: axlecrusher
Date: 2008-12-13 17:28:34 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
thread the update to do concurrent update and render
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2008-12-13 17:26:41 UTC (rev 75)
+++ Mercury2/src/Mercury2.cpp 2008-12-13 17:28:34 UTC (rev 76)
@@ -6,6 +6,15 @@
#include <XMLParser.h>
+void* UpdateThread(void* node)
+{
+ while(true)
+ {
+ MercuryNode* n = (MercuryNode*)node;
+ n->RecursiveUpdate(0.01f);
+ }
+}
+
int main()
{
unsigned long m_count = 0;
@@ -21,10 +30,14 @@
SAFE_DELETE(doc);
+ MercuryThread updateThread;
+
m_time = time(NULL);
+ updateThread.Create( UpdateThread, root, false);
do
{
- root->RecursiveUpdate(0.01f);
+// root->RecursiveUpdate(0.01f);
+// updateThread.Create( UpdateThread, root, false);
RenderableNode::RecursiveRender(root);
w->SwapBuffers();
++m_count;
@@ -35,8 +48,12 @@
printf("FPS: %lu\n", m_count);
m_count = 0;
}
+// updateThread.Wait();
}
while ( w->PumpMessages() );
+
+ updateThread.HaltOnDestroy(true);
+ updateThread.Halt();
SAFE_DELETE(root);
SAFE_DELETE(w);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-01-22 16:27:54
|
Revision: 149
http://hgengine.svn.sourceforge.net/hgengine/?rev=149&view=rev
Author: cnlohr
Date: 2009-01-22 16:27:44 +0000 (Thu, 22 Jan 2009)
Log Message:
-----------
We no longer need <sys/time.h> and since <sys/time.h> is not used on Windows, it would otherwise cause a compile error.
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-01-04 19:56:47 UTC (rev 148)
+++ Mercury2/src/Mercury2.cpp 2009-01-22 16:27:44 UTC (rev 149)
@@ -8,8 +8,6 @@
#include <RenderableNode.h>
-#include <sys/time.h>
-
#include <MercuryCrash.h>
#include <MercuryBacktrace.h>
#include <MercuryMessageManager.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-04-04 19:51:35
|
Revision: 196
http://hgengine.svn.sourceforge.net/hgengine/?rev=196&view=rev
Author: axlecrusher
Date: 2009-04-04 19:51:27 +0000 (Sat, 04 Apr 2009)
Log Message:
-----------
use the rendergraph to render
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-04-04 19:50:52 UTC (rev 195)
+++ Mercury2/src/Mercury2.cpp 2009-04-04 19:51:27 UTC (rev 196)
@@ -13,6 +13,7 @@
#include <MercuryMessageManager.h>
#include <MercuryTimer.h>
+#include <RenderGraph.h>
MSemaphore UpdateLoopGo;
void* UpdateThread(void* node)
@@ -53,6 +54,7 @@
MercuryTimer timer;
MercuryTimer fpsTimer;
+ RenderGraph renderGraph;
//uncomment the next 2 lines to use threads
// MercuryThread updateThread;
@@ -62,7 +64,14 @@
timer.Touch();
MESSAGEMAN::GetInstance().PumpMessages( timer.MicrosecondsSinceInit() );
root->RecursiveUpdate( timer.Age() ); //comment to use threads
- RenderableNode::RecursiveRender(root);
+
+ if ( MercuryNode::NeedsRebuild() )
+ {
+ renderGraph.Build(root);
+ }
+
+ renderGraph.Render();
+// RenderableNode::RecursiveRender(root);
w->SwapBuffers();
++m_count;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-05-12 04:56:53
|
Revision: 225
http://hgengine.svn.sourceforge.net/hgengine/?rev=225&view=rev
Author: cnlohr
Date: 2009-05-12 04:56:51 +0000 (Tue, 12 May 2009)
Log Message:
-----------
Load OGL Extensions at boot.
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-05-12 04:55:43 UTC (rev 224)
+++ Mercury2/src/Mercury2.cpp 2009-05-12 04:56:51 UTC (rev 225)
@@ -15,6 +15,7 @@
#include <MercuryTimer.h>
#include <RenderGraph.h>
#include <Texture.h>
+#include <GLHeaders.h>
bool SHOWBOUNDINGVOLUME = false;
@@ -42,10 +43,15 @@
int main()
{
unsigned long m_count = 0;
-
+
cnset_execute_on_crash( SignalHandler );
MercuryWindow* w = MercuryWindow::MakeWindow();
+
+#ifdef WIN32
+ SetupOGLExtensions();
+#endif
+
MercuryNode* root = new MercuryNode();
XMLDocument* doc = XMLDocument::Load("scenegraph.xml");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-08-18 05:20:32
|
Revision: 484
http://hgengine.svn.sourceforge.net/hgengine/?rev=484&view=rev
Author: cnlohr
Date: 2009-08-18 05:20:25 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
remove recursion method we won't be using
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-08-18 05:20:06 UTC (rev 483)
+++ Mercury2/src/Mercury2.cpp 2009-08-18 05:20:25 UTC (rev 484)
@@ -77,39 +77,22 @@
timer.Touch();
MESSAGEMAN::GetInstance().PumpMessages( timer.MicrosecondsSinceInit() );
- //If false, use experimental traversal technique.
- if(true)
+ root->RecursiveUpdate( timer.Age() ); //comment to use threads
+
+ CURRENTRENDERGRAPH = &renderGraph;
+ if ( MercuryNode::NeedsRebuild() )
{
- root->RecursiveUpdate( timer.Age() ); //comment to use threads
-
- CURRENTRENDERGRAPH = &renderGraph;
- if ( MercuryNode::NeedsRebuild() )
- {
- renderGraph.Build(root);
- }
-
- w->Clear();
- // renderGraph.Render();
- // RenderableNode::RecursiveRender(root);
- // printf("\n");
- root->RecursivePreRender();
- root->RecursiveRender();
- // renderGraph.RenderAlpha();
- w->SwapBuffers();
+ renderGraph.Build(root);
}
- else
- {
- CURRENTRENDERGRAPH = &renderGraph;
- if ( MercuryNode::NeedsRebuild() )
- {
- renderGraph.Build(root);
- }
- Viewport* vp = (Viewport*)root->FirstChild();
- w->Clear();
- vp->GoAll( timer.Age() );
- w->SwapBuffers();
- }
+ w->Clear();
+// renderGraph.Render();
+// RenderableNode::RecursiveRender(root);
+// printf("\n");
+ root->RecursivePreRender();
+ root->RecursiveRender();
+// renderGraph.RenderAlpha();
+ w->SwapBuffers();
++m_count;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-08-22 20:21:27
|
Revision: 512
http://hgengine.svn.sourceforge.net/hgengine/?rev=512&view=rev
Author: cnlohr
Date: 2009-08-22 20:21:08 +0000 (Sat, 22 Aug 2009)
Log Message:
-----------
add command line parameters to Mercury
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-08-22 19:46:34 UTC (rev 511)
+++ Mercury2/src/Mercury2.cpp 2009-08-22 20:21:08 UTC (rev 512)
@@ -46,12 +46,59 @@
return 0; //Continue regular crash.
}
-int main()
+MString g_SceneGraphToLoad;
+void HandleCommandLineParameters( int argc, char ** argv )
{
+ bool bPrintHelp = false;
+ for( int i = 1; i < argc; i++ )
+ {
+ MString sParameter = argv[i];
+ if( sParameter == "--help" || sParameter == "-h" )
+ bPrintHelp = true;
+ else if( sParameter.find( "--scenegraph=" ) == 0 )
+ g_SceneGraphToLoad = sParameter.substr( 13 );
+ else if( sParameter == "-s" )
+ {
+ i++;
+ if( i >= argc )
+ {
+ fprintf( stderr, "No scene graph following -s. Type -h for help.\n" );
+ exit(-1);
+ }
+ g_SceneGraphToLoad = argv[i];
+ }
+ else
+ {
+ fprintf( stderr, "Unknown command-line parameter: \"%s\" Type -h for help.\n", argv[i] );
+ exit(-1);
+ }
+ }
+
+ if( bPrintHelp )
+ {
+ printf( "\nMercury Game Engine 2.0 Copyright 2009 Joshua Allen and\n" );
+ printf( " Charles Lohr under the NewBSD license. Code contributed\n" );
+ printf( " from other sources under the same license, contributers\n" );
+ printf( " and other sources may be found in accompanying documents.\n" );
+ printf( "\n Usage: [mercury] [command-line parameters]\n\n" );
+ printf( " [--scenegraph=x] | [-s x] Select scene graph to use.\n" );
+ printf( " By default Mercury uses FILE:scenegraph.xml. You may\n" );
+ printf( " specify another one here. This only changes the startup\n" );
+ printf( " scene graph for debugging purposes.\n\n" );
+ exit(0);
+ }
+}
+
+int main( int argc, char** argv)
+{
unsigned long m_count = 0;
+ g_SceneGraphToLoad = "FILE:scenegraph.xml";
+
cnset_execute_on_crash( SignalHandler );
+ HandleCommandLineParameters( argc, argv );
+
MercuryWindow* w = MercuryWindow::MakeWindow();
#ifdef WIN32
@@ -62,7 +109,7 @@
MercuryNode* root = new MercuryNode();
- XMLDocument* doc = XMLDocument::Load("FILE:scenegraph.xml");
+ XMLDocument* doc = XMLDocument::Load(g_SceneGraphToLoad);
XMLNode r = doc->GetRootNode();
root->LoadFromXML( r );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2009-11-03 08:21:51
|
Revision: 595
http://hgengine.svn.sourceforge.net/hgengine/?rev=595&view=rev
Author: cnlohr
Date: 2009-11-03 08:21:44 +0000 (Tue, 03 Nov 2009)
Log Message:
-----------
remove xml exporting (debugging thing shouldn't have been committed)
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-11-03 08:20:45 UTC (rev 594)
+++ Mercury2/src/Mercury2.cpp 2009-11-03 08:21:44 UTC (rev 595)
@@ -178,9 +178,9 @@
}
//Uncomment to enable scenegraph saving.
- MString st;
- root->SaveToXML( st );
- StringToFile( "test.xml", st );
+// MString st;
+// root->SaveToXML( st );
+// StringToFile( "test.xml", st );
}
while ( w->PumpMessages() );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2010-01-15 21:54:07
|
Revision: 663
http://hgengine.svn.sourceforge.net/hgengine/?rev=663&view=rev
Author: axlecrusher
Date: 2010-01-15 21:53:59 +0000 (Fri, 15 Jan 2010)
Log Message:
-----------
add more debugging options
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2010-01-15 21:52:17 UTC (rev 662)
+++ Mercury2/src/Mercury2.cpp 2010-01-15 21:53:59 UTC (rev 663)
@@ -21,6 +21,13 @@
#include <MercuryLog.h>
+#ifdef WIN32DBGMEM
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
+
+
#define MULTIPASS
bool SHOWBOUNDINGVOLUME = false;
@@ -42,9 +49,9 @@
{
char buffer[2048];
LOG.Write(ssprintf( "Fatal error encountered in Mercury 2: %s", cn_get_crash_description( signal ) ));
- cnget_backtrace( 1, buffer, 2047 );
-
- //XXX: Sometimes we produce a crash, we get the crash report, and the next line doesn't work... This should be examined.
+ cnget_backtrace( 1, buffer, 2047 );
+
+ //XXX: Sometimes we produce a crash, we get the crash report, and the next line doesn't work... This should be examined.
LOG.Write( buffer );
return 0; //Continue regular crash.
@@ -95,15 +102,20 @@
int main( int argc, char** argv)
{
+#ifdef WIN32DBGMEM
+ _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+#endif
unsigned long m_count = 0;
g_SceneGraphToLoad = "FILE:scenegraph.xml";
+#ifndef NOCRAHSHANDLE
cnset_execute_on_crash( SignalHandler );
+#endif
HandleCommandLineParameters( argc, argv );
-
- //Sound first.
- SOUNDMAN->Init( "" );
+
+ //Sound first.
+ SOUNDMAN->Init( "" );
MercuryWindow* w = MercuryWindow::MakeWindow();
#ifdef WIN32
@@ -168,19 +180,19 @@
float batches = MercuryVBO::ResetBatchCount()/(float)m_count;
float VBinds = MercuryVBO::ResetBindCount()/(float)m_count;
float Tbinds = Texture::ReadAndResetBindCount()/(float)m_count;
- LOG.Write( ssprintf("FPS: %f, VBO batches %f, TBinds %f, VBinds %f", m_count/fpsTimer.Age(), batches, Tbinds, VBinds) );
+ LOG.Write( ssprintf("FPS: %f, VBO batches %f, TBinds %f, VBinds %f", m_count/fpsTimer.Age(), batches, Tbinds, VBinds) );
#ifdef GL_PROFILE
float GLcalls = GLCALLCOUNT/(float)m_count;
GLCALLCOUNT = 0;
- LOG.Write( ssprintf("GL/f: %f", GLcalls) );
+ LOG.Write( ssprintf("GL/f: %f", GLcalls) );
#endif
m_count = 0;
fpsTimer = timer;
- }
-
-//Uncomment to enable scenegraph saving.
-// MString st;
-// root->SaveToXML( st );
+ }
+
+//Uncomment to enable scenegraph saving.
+// MString st;
+// root->SaveToXML( st );
// StringToFile( "test.xml", st );
}
while ( w->PumpMessages() );
@@ -199,30 +211,30 @@
// printf("Render wait %%%f\n", (RenderWaited/double(totalWaited))*100.0f);
return 0;
-}
-
-
-
-
-
-///XXXXXXXX STUB CODE XXXXXXXXXXX THIS CODE SHOULD BE REMOVED AS SOON AS TESTING OF THE VARIABLE SYSTEM IS COMPLETE
-class TestMouse
-{
-public:
- TestMouse()
- {
- MESSAGEMAN.GetValue( "TestMode" )->AttachModifyDelegate( (ValueDelegate)&TestMouse::ChangeX, (MessageHandler*)this );
- }
-
- void ChangeX( MValue * v )
- {
- printf( "Changed: %s\n", v->GetString().c_str() );
- }
-} TM;
-///XXXXXXX REMOVE THIS CODE BEFORE ANY RELEASE XXXXXXXXXXx
-
+}
+
+
+
+///XXXXXXXX STUB CODE XXXXXXXXXXX THIS CODE SHOULD BE REMOVED AS SOON AS TESTING OF THE VARIABLE SYSTEM IS COMPLETE
+class TestMouse
+{
+public:
+ TestMouse()
+ {
+ MESSAGEMAN.GetValue( "TestMode" )->AttachModifyDelegate( (ValueDelegate)&TestMouse::ChangeX, (MessageHandler*)this );
+ }
+
+ void ChangeX( MValue * v )
+ {
+ printf( "Changed: %s\n", v->GetString().c_str() );
+ }
+} TM;
+///XXXXXXX REMOVE THIS CODE BEFORE ANY RELEASE XXXXXXXXXXx
+
+
+
/* Copyright (c) 2008, Joshua Allen
* All rights reserved.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2008-12-30 23:47:04
|
Revision: 117
http://hgengine.svn.sourceforge.net/hgengine/?rev=117&view=rev
Author: axlecrusher
Date: 2008-12-30 23:46:54 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
comment the lines for using threads
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2008-12-30 23:26:56 UTC (rev 116)
+++ Mercury2/src/Mercury2.cpp 2008-12-30 23:46:54 UTC (rev 117)
@@ -37,7 +37,6 @@
int main()
{
unsigned long m_count = 0;
-// long m_time;
cnset_execute_on_crash( SignalHandler );
@@ -50,19 +49,18 @@
root->LoadFromXML( r );
SAFE_DELETE(doc);
-
-// MercuryThread updateThread;
-
-// m_time = time(NULL);
+
uint64_t oTime = GetTimeInMicroSeconds();
uint64_t m_time = oTime;
+ //uncomment the next 2 lines to use threads
+// MercuryThread updateThread;
// updateThread.Create( UpdateThread, root, false);
+
do
{
uint64_t curTime = GetTimeInMicroSeconds();
- root->RecursiveUpdate((curTime-oTime)/1000000.0f);
-// updateThread.Create( UpdateThread, root, false);
+ root->RecursiveUpdate((curTime-oTime)/1000000.0f); //comment to use threads
RenderableNode::RecursiveRender(root);
w->SwapBuffers();
++m_count;
@@ -79,6 +77,7 @@
}
while ( w->PumpMessages() );
+ //uncomment the next 2 lines to use threads
// UpdateLoopGo.Increment();
// updateThread.Wait();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-01-01 03:44:17
|
Revision: 132
http://hgengine.svn.sourceforge.net/hgengine/?rev=132&view=rev
Author: axlecrusher
Date: 2009-01-01 03:44:13 +0000 (Thu, 01 Jan 2009)
Log Message:
-----------
update for message system
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-01-01 03:40:46 UTC (rev 131)
+++ Mercury2/src/Mercury2.cpp 2009-01-01 03:44:13 UTC (rev 132)
@@ -12,7 +12,7 @@
#include <MercuryCrash.h>
#include <MercuryBacktrace.h>
-
+#include <MercuryMessageManager.h>
MSemaphore UpdateLoopGo;
void* UpdateThread(void* node)
{
@@ -37,7 +37,9 @@
int main()
{
unsigned long m_count = 0;
-
+ uint64_t startTime = GetTimeInMicroSeconds();
+ uint64_t timeSinceStart = 0;
+
cnset_execute_on_crash( SignalHandler );
MercuryWindow* w = MercuryWindow::MakeWindow();
@@ -50,30 +52,30 @@
SAFE_DELETE(doc);
- uint64_t oTime = GetTimeInMicroSeconds();
+ uint64_t oTime = timeSinceStart;
uint64_t m_time = oTime;
//uncomment the next 2 lines to use threads
// MercuryThread updateThread;
// updateThread.Create( UpdateThread, root, false);
-
do
{
- uint64_t curTime = GetTimeInMicroSeconds();
- root->RecursiveUpdate((curTime-oTime)/1000000.0f); //comment to use threads
+ timeSinceStart = GetTimeInMicroSeconds() - startTime;
+ MESSAGEMAN::GetInstance().PumpMessages( timeSinceStart );
+ root->RecursiveUpdate((timeSinceStart-oTime)/1000000.0f); //comment to use threads
RenderableNode::RecursiveRender(root);
w->SwapBuffers();
++m_count;
- float seconds = (curTime-m_time)/1000000.0f;
+ float seconds = (timeSinceStart-m_time)/1000000.0f;
if (seconds > 1)
{
- m_time = curTime;
+ m_time = timeSinceStart;
printf("FPS: %f\n", m_count/seconds);
m_count = 0;
}
- oTime = curTime;
+ oTime = timeSinceStart;
}
while ( w->PumpMessages() );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-01-02 01:17:39
|
Revision: 137
http://hgengine.svn.sourceforge.net/hgengine/?rev=137&view=rev
Author: axlecrusher
Date: 2009-01-02 01:17:34 +0000 (Fri, 02 Jan 2009)
Log Message:
-----------
enable message pump
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-01-02 01:15:53 UTC (rev 136)
+++ Mercury2/src/Mercury2.cpp 2009-01-02 01:17:34 UTC (rev 137)
@@ -62,7 +62,7 @@
do
{
timer.Touch();
-// MESSAGEMAN::GetInstance().PumpMessages( timer.MicrosecondsSinceInit() );
+ MESSAGEMAN::GetInstance().PumpMessages( timer.MicrosecondsSinceInit() );
root->RecursiveUpdate( timer.Age() ); //comment to use threads
RenderableNode::RecursiveRender(root);
w->SwapBuffers();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <axl...@us...> - 2009-07-26 02:13:55
|
Revision: 440
http://hgengine.svn.sourceforge.net/hgengine/?rev=440&view=rev
Author: axlecrusher
Date: 2009-07-26 02:13:48 +0000 (Sun, 26 Jul 2009)
Log Message:
-----------
move to viewport
Modified Paths:
--------------
Mercury2/src/Mercury2.cpp
Modified: Mercury2/src/Mercury2.cpp
===================================================================
--- Mercury2/src/Mercury2.cpp 2009-07-26 02:13:15 UTC (rev 439)
+++ Mercury2/src/Mercury2.cpp 2009-07-26 02:13:48 UTC (rev 440)
@@ -90,7 +90,7 @@
// printf("\n");
root->RecursivePreRender();
root->RecursiveRender();
- renderGraph.RenderAlpha();
+// renderGraph.RenderAlpha();
w->SwapBuffers();
++m_count;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|