From: <axl...@us...> - 2009-06-04 00:12:01
|
Revision: 303 http://hgengine.svn.sourceforge.net/hgengine/?rev=303&view=rev Author: axlecrusher Date: 2009-06-04 00:11:52 +0000 (Thu, 04 Jun 2009) Log Message: ----------- show axes Modified Paths: -------------- Mercury2/src/MercuryAsset.cpp Mercury2/src/MercuryAsset.h Mercury2/src/MercuryVBO.cpp Modified: Mercury2/src/MercuryAsset.cpp =================================================================== --- Mercury2/src/MercuryAsset.cpp 2009-06-04 00:11:19 UTC (rev 302) +++ Mercury2/src/MercuryAsset.cpp 2009-06-04 00:11:52 UTC (rev 303) @@ -1,6 +1,8 @@ #include <MercuryAsset.h> #include <RenderableNode.h> +#include <GLHeaders.h> + MercuryAsset::MercuryAsset() :m_isInstanced(false), m_boundingVolume(NULL), m_loadState(NONE) { @@ -35,6 +37,22 @@ SetLoadState( LOADED ); } +void MercuryAsset::DrawAxes() +{ + glBegin(GL_LINES); + glColor3f(1,0,0); + glVertex3f(0,0,0); + glVertex3f(0.5,0,0); + glColor3f(0,1,0); + glVertex3f(0,0,0); + glVertex3f(0,0.5,0); + glColor3f(0,0,1); + glVertex3f(0,0,0); + glVertex3f(0,0,0.5); + glColor3f(1,1,1); + glEnd(); +} + AssetFactory& AssetFactory::GetInstance() { static AssetFactory* instance = NULL; Modified: Mercury2/src/MercuryAsset.h =================================================================== --- Mercury2/src/MercuryAsset.h 2009-06-04 00:11:19 UTC (rev 302) +++ Mercury2/src/MercuryAsset.h 2009-06-04 00:11:52 UTC (rev 303) @@ -40,6 +40,8 @@ inline const BoundingVolume* GetBoundingVolume() const { return m_boundingVolume; } inline const MString& Path() const { return m_path; } + + void DrawAxes(); protected: void SetLoadState(LoadState ls); //thread safe LoadState GetLoadState(); //thread safe Modified: Mercury2/src/MercuryVBO.cpp =================================================================== --- Mercury2/src/MercuryVBO.cpp 2009-06-04 00:11:19 UTC (rev 302) +++ Mercury2/src/MercuryVBO.cpp 2009-06-04 00:11:52 UTC (rev 303) @@ -57,6 +57,7 @@ m_lastVBOrendered = this; if (m_boundingVolume && SHOWBOUNDINGVOLUME) m_boundingVolume->Render(); + DrawAxes(); } void MercuryVBO::InitVBO() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |