add FPS and speed to OSG debug HUD
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7991 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: c46a7065bb0de61e90e1e5bd5638dc9151948751 Former-commit-id: 6744e1045bf3aace97f733506f6e8169332d540f
This commit is contained in:
parent
a9433de762
commit
e5b0553169
2 changed files with 8 additions and 15 deletions
|
@ -13,7 +13,7 @@ SDDebugHUD::SDDebugHUD()
|
|||
osg::Geometry* geom;
|
||||
osg::ref_ptr<osg::Vec3Array> texcoords;
|
||||
|
||||
osg::ref_ptr<osg::Geode> quad = new osg::Geode;
|
||||
osg::ref_ptr<osg::Geode> quad = new osg::Geode;
|
||||
|
||||
float zoom = 0.5f;
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ void OSGPLOT::clearDataPoints()
|
|||
{
|
||||
for (std::list<PlotLine>::iterator it = plotLines.begin(); it != plotLines.end(); ++it)
|
||||
{
|
||||
if (!it->reference)
|
||||
if (!it->reference && it->Ydata != "fps")
|
||||
it->clearDataPoints();
|
||||
}
|
||||
}
|
||||
|
@ -721,13 +721,11 @@ void changeImageAlpha(osg::Geometry *geom,
|
|||
|
||||
// TODO[END]: move this to utils? /src/modules/graphic/osggraph/Utils
|
||||
|
||||
SDHUD::SDHUD()
|
||||
SDHUD::SDHUD() :
|
||||
_car(nullptr),
|
||||
lastCar(nullptr),
|
||||
hudScale(1.0f)
|
||||
{
|
||||
//_cameraHUD = new osg::Camera;
|
||||
|
||||
//initialize some vars
|
||||
lastCar = NULL;
|
||||
hudScale = 1.0f;
|
||||
}
|
||||
|
||||
void SDHUD::CreateHUD(int scrH, int scrW)
|
||||
|
@ -1640,8 +1638,7 @@ osg::ref_ptr <osg::Group> SDHUD::generateHudFromXmlFile(int scrH, int scrW)
|
|||
|
||||
std::string mainSection= "widgets";
|
||||
std::string widgetsSectionPath;
|
||||
std::string widgetsSectionName= "widgets";
|
||||
std::string sectionPath;
|
||||
std::string widgetsSectionName;
|
||||
std::string subSectionPath;
|
||||
std::string subSectionName;
|
||||
|
||||
|
@ -1732,11 +1729,7 @@ osg::ref_ptr <osg::Group> SDHUD::generateHudFromXmlFile(int scrH, int scrW)
|
|||
}
|
||||
|
||||
//set alignement
|
||||
if (textAlign=="")
|
||||
{
|
||||
text->setAlignment(osgText::Text::LEFT_BOTTOM_BASE_LINE );
|
||||
}
|
||||
else if (textAlign=="LEFT_BOTTOM")
|
||||
if (textAlign.empty() || textAlign=="LEFT_BOTTOM")
|
||||
{
|
||||
text->setAlignment(osgText::Text::LEFT_BOTTOM_BASE_LINE );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue