Merged mainline

This commit is contained in:
dfighter1985 2015-02-02 02:03:00 +01:00
commit 41e2e8b4db
3 changed files with 23 additions and 15 deletions

View file

@ -109,10 +109,6 @@ void UDriver::purgeMemory()
// ***************************************************************************
// ***************************************************************************
bool CDriverUser::_StaticInit= false;
// ***************************************************************************
CDriverUser::CDriverUser (uintptr_t windowIcon, TDriver driver, emptyProc exitFunc)
{
@ -122,16 +118,7 @@ CDriverUser::CDriverUser (uintptr_t windowIcon, TDriver driver, emptyProc exitFu
nlassert((uint)IDriver::iconCount == (uint)UDriver::iconCount);
// Static Initialisation.
if(!_StaticInit)
{
_StaticInit= true;
// Register basic serial.
NL3D::registerSerial3d();
// Register basic csene.
CScene::registerBasics();
}
NL3D::init3d();
_Driver = NULL;

View file

@ -19,18 +19,36 @@
#include "nel/3d/init_3d.h"
#include <cfloat>
#include "nel/3d/scene.h"
#include "nel/3d/register_3d.h"
namespace
{
static bool _Initialized = false;
}
namespace NL3D
{
void init3d ()
{
if( _Initialized )
return;
// Init for windows
#ifdef NL_OS_WINDOWS
// Enable FPU exceptions
// Enable divid by zero and overflow exception
_control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM);
//_control87 (_EM_INVALID|_EM_DENORMAL/*|_EM_ZERODIVIDE|_EM_OVERFLOW*/|_EM_UNDERFLOW|_EM_INEXACT, _MCW_EM);
NL3D::registerSerial3d();
CScene::registerBasics();
_Initialized = true;
#endif // NL_OS_WINDOWS
}

View file

@ -8,6 +8,7 @@
// NeL includes
#include "nel/misc/debug.h"
#include "nel/3d/init_3d.h"
// Qt includes
#include <QtCore/QObject>
@ -32,6 +33,8 @@ bool ObjectViewerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManag
{
Q_UNUSED(errorString);
_plugMan = pluginManager;
NL3D::init3d();
Modules::init();
addAutoReleasedObject(new CObjectViewerContext());
addAutoReleasedObject(new GraphicsSettingsPage());