2008-05-22 04:51:37 -07:00
|
|
|
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
2007-05-20 11:03:49 -07:00
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
|
|
|
#include "IrrCompileConfig.h"
|
|
|
|
|
2008-05-22 04:51:37 -07:00
|
|
|
static const char* const copyright = "Irrlicht Engine (c) 2002-2008 Nikolaus Gebhardt";
|
2007-09-05 08:21:47 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
#ifdef _IRR_WINDOWS_
|
|
|
|
#include <windows.h>
|
2008-01-02 02:28:12 -08:00
|
|
|
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE)
|
2007-05-20 11:03:49 -07:00
|
|
|
#include <crtdbg.h>
|
|
|
|
#endif // _DEBUG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _IRR_XBOX_PLATFORM_
|
|
|
|
#include <xtl.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "irrlicht.h"
|
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
//! stub for calling createDeviceEx
|
|
|
|
IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType,
|
|
|
|
const core::dimension2d<s32>& windowSize,
|
2008-06-12 04:15:45 -07:00
|
|
|
u32 bits, bool fullscreen,
|
2008-06-13 06:35:03 -07:00
|
|
|
bool stencilbuffer, bool vsync, IEventReceiver* res)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
2007-09-19 07:08:28 -07:00
|
|
|
SIrrlichtCreationParameters p;
|
2007-05-20 11:03:49 -07:00
|
|
|
p.DriverType = driverType;
|
|
|
|
p.WindowSize = windowSize;
|
|
|
|
p.Bits = bits;
|
|
|
|
p.Fullscreen = fullscreen;
|
|
|
|
p.Stencilbuffer = stencilbuffer;
|
|
|
|
p.Vsync = vsync;
|
2008-06-12 04:15:45 -07:00
|
|
|
p.EventReceiver = res;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
return createDeviceEx(p);
|
|
|
|
}
|
|
|
|
|
2008-09-02 15:11:19 -07:00
|
|
|
namespace core
|
|
|
|
{
|
2008-11-12 07:37:18 -08:00
|
|
|
IRRLICHT_API const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
|
2008-09-02 15:11:19 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
} // end namespace irr
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(_IRR_WINDOWS_API_)
|
|
|
|
|
2008-06-12 04:15:45 -07:00
|
|
|
BOOL APIENTRY DllMain( HANDLE hModule,
|
|
|
|
DWORD ul_reason_for_call,
|
2007-05-20 11:03:49 -07:00
|
|
|
LPVOID lpReserved )
|
|
|
|
{
|
|
|
|
// _crtBreakAlloc = 139;
|
|
|
|
|
|
|
|
switch (ul_reason_for_call)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2008-01-02 02:28:12 -08:00
|
|
|
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE)
|
2007-05-20 11:03:49 -07:00
|
|
|
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF);
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
case DLL_THREAD_ATTACH:
|
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // defined(_IRR_WINDOWS_)
|
|
|
|
|