mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-16 14:28:43 +00:00
Changed: #1193 Code cleanup.
This commit is contained in:
parent
c49add86c8
commit
ac738488d4
4 changed files with 9 additions and 10 deletions
|
@ -218,7 +218,7 @@ void CConfiguration::cfcbSearchPaths(NLMISC::CConfigFile::CVar &var)
|
||||||
{
|
{
|
||||||
uint varsize = var.size();
|
uint varsize = var.size();
|
||||||
for (uint i = 0; i < varsize; ++i)
|
for (uint i = 0; i < varsize; ++i)
|
||||||
CPath::addSearchPath(var.asString(i), true, false);
|
CPath::addSearchPath(var.asString(i), false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace NLQT */
|
} /* namespace NLQT */
|
|
@ -105,7 +105,7 @@ CMainWindow::CMainWindow(QWidget *parent)
|
||||||
connect(_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender()));
|
connect(_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender()));
|
||||||
// timer->start(); // <- timeout 0
|
// timer->start(); // <- timeout 0
|
||||||
// it's heavy on cpu, though, when no 3d driver initialized :)
|
// it's heavy on cpu, though, when no 3d driver initialized :)
|
||||||
_mainTimer->start(20); // 25fps
|
_mainTimer->start(23); // 25fps
|
||||||
|
|
||||||
_statusBarTimer = new QTimer(this);
|
_statusBarTimer = new QTimer(this);
|
||||||
connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
|
connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
|
||||||
|
@ -709,7 +709,7 @@ void CMainWindow::updateRender()
|
||||||
if (_isGraphicsInitialized && !Modules::objView().getDriver()->isLost())
|
if (_isGraphicsInitialized && !Modules::objView().getDriver()->isLost())
|
||||||
{
|
{
|
||||||
// 01. Render Driver (background color)
|
// 01. Render Driver (background color)
|
||||||
Modules::objView().getDriver()->activate();
|
//Modules::objView().getDriver()->activate();
|
||||||
Modules::objView().renderDriver(); // clear all buffers
|
Modules::objView().renderDriver(); // clear all buffers
|
||||||
|
|
||||||
// 02. Render Sky (sky scene)
|
// 02. Render Sky (sky scene)
|
||||||
|
|
|
@ -264,11 +264,14 @@ bool CObjectViewer::loadMesh(const std::string &meshFileName, const std::string
|
||||||
if (_Entities.count(fileName) != 0)
|
if (_Entities.count(fileName) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CPath::addSearchPath(CFile::getPath(meshFileName));
|
CPath::addSearchPath(CFile::getPath(meshFileName), false, false);
|
||||||
|
|
||||||
// create instance of the mesh character
|
// create instance of the mesh character
|
||||||
UInstance Entity = _Scene->createInstance(meshFileName);
|
UInstance Entity = _Scene->createInstance(meshFileName);
|
||||||
|
|
||||||
|
// if we can't create entity, skip it
|
||||||
|
if (Entity.empty()) return false;
|
||||||
|
|
||||||
CAABBox bbox;
|
CAABBox bbox;
|
||||||
Entity.getShapeAABBox(bbox);
|
Entity.getShapeAABBox(bbox);
|
||||||
setCamera(bbox , Entity, true);
|
setCamera(bbox , Entity, true);
|
||||||
|
@ -277,9 +280,6 @@ bool CObjectViewer::loadMesh(const std::string &meshFileName, const std::string
|
||||||
|
|
||||||
USkeleton Skeleton = _Scene->createSkeleton(skelFileName);
|
USkeleton Skeleton = _Scene->createSkeleton(skelFileName);
|
||||||
|
|
||||||
// if we can't create entity, skip it
|
|
||||||
if (Entity.empty()) return false;
|
|
||||||
|
|
||||||
// TODO: remade at typedef std::map<std::string, *CEntity> CEntities;
|
// TODO: remade at typedef std::map<std::string, *CEntity> CEntities;
|
||||||
EIT eit = (_Entities.insert (make_pair (fileName, CEntity()))).first;
|
EIT eit = (_Entities.insert (make_pair (fileName, CEntity()))).first;
|
||||||
CEntity &entity = (*eit).second;
|
CEntity &entity = (*eit).second;
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
#include <QtGui/QHeaderView>
|
#include <QtGui/QHeaderView>
|
||||||
#include <QtGui/QPushButton>
|
#include <QtGui/QPushButton>
|
||||||
|
|
||||||
namespace Core
|
|
||||||
{
|
|
||||||
|
|
||||||
struct PageData
|
struct PageData
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
@ -34,6 +31,8 @@ struct PageData
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(PageData);
|
Q_DECLARE_METATYPE(PageData);
|
||||||
|
|
||||||
|
namespace Core
|
||||||
|
{
|
||||||
CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
|
CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
|
||||||
const QString &categoryId,
|
const QString &categoryId,
|
||||||
const QString &pageId,
|
const QString &pageId,
|
||||||
|
|
Loading…
Reference in a new issue