Merged hotfix

This commit is contained in:
dfighter1985 2015-02-02 03:54:50 +01:00
commit 711261cb0d
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) 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); nlassert((uint)IDriver::iconCount == (uint)UDriver::iconCount);
// Static Initialisation. NL3D::init3d();
if(!_StaticInit)
{
_StaticInit= true;
// Register basic serial.
NL3D::registerSerial3d();
// Register basic csene.
CScene::registerBasics();
}
_Driver = NULL; _Driver = NULL;

View file

@ -19,18 +19,36 @@
#include "nel/3d/init_3d.h" #include "nel/3d/init_3d.h"
#include <cfloat> #include <cfloat>
#include "nel/3d/scene.h"
#include "nel/3d/register_3d.h"
namespace
{
static bool _Initialized = false;
}
namespace NL3D namespace NL3D
{ {
void init3d () void init3d ()
{ {
if( _Initialized )
return;
// Init for windows // Init for windows
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
// Enable FPU exceptions // Enable FPU exceptions
// Enable divid by zero and overflow exception // 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 #endif // NL_OS_WINDOWS
} }

View file

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