mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
Changed: #1251 Code simplification and default values if not using config.h
This commit is contained in:
parent
1266d1d5a4
commit
6c4f4bb1df
3 changed files with 7 additions and 14 deletions
|
@ -36,10 +36,6 @@
|
|||
#include "nel/misc/hierarchical_timer.h"
|
||||
#include "nel/misc/event_emitter.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
using namespace NLMISC;
|
||||
|
||||
namespace NL3D
|
||||
|
@ -137,15 +133,13 @@ CDriverUser::CDriverUser (uint windowIcon, bool direct3d, emptyProc exitFunc)
|
|||
_Driver = NULL;
|
||||
|
||||
// Create/Init Driver.
|
||||
#if defined(NL_OS_WINDOWS) && defined(NL_DIRECT3D_AVAILABLE)
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
if (direct3d)
|
||||
_Driver= CDRU::createD3DDriver();
|
||||
#endif
|
||||
|
||||
#ifdef NL_OPENGL_AVAILABLE
|
||||
if (!_Driver)
|
||||
_Driver= CDRU::createGlDriver();
|
||||
#endif
|
||||
|
||||
nlassert(_Driver);
|
||||
_Driver->init (windowIcon, exitFunc);
|
||||
|
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#else
|
||||
# define NL_OPENGL_AVAILABLE
|
||||
# ifdef NL_OS_WINDOWS
|
||||
# define NL_DIRECT3D_AVAILABLE
|
||||
# endif
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#include "nel/3d/vertex_stream_manager.h"
|
||||
#include "nel/misc/debug.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
||||
|
@ -62,19 +58,17 @@ bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow syst
|
|||
CNELU::Driver = NULL;
|
||||
|
||||
// Init driver.
|
||||
#if defined(NL_OS_WINDOWS) && defined(NL_DIRECT3D_AVAILABLE)
|
||||
#if defined(NL_OS_WINDOWS)
|
||||
if (direct3d)
|
||||
{
|
||||
CNELU::Driver= CDRU::createD3DDriver();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NL_OPENGL_AVAILABLE
|
||||
if (!CNELU::Driver)
|
||||
{
|
||||
CNELU::Driver= CDRU::createGlDriver();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!CNELU::Driver)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue