irrlicht/source/Irrlicht/Irrlicht.cpp

77 lines
1.8 KiB
C++

// Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
static const char* const copyright = "Irrlicht Engine (c) 2002-2009 Nikolaus Gebhardt";
#ifdef _IRR_WINDOWS_
#include <windows.h>
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(_WIN32_WCE)
#include <crtdbg.h>
#endif // _DEBUG
#endif
#include "irrlicht.h"
namespace irr
{
//! stub for calling createDeviceEx
IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType,
const core::dimension2d<u32>& windowSize,
u32 bits, bool fullscreen,
bool stencilbuffer, bool vsync, IEventReceiver* res)
{
SIrrlichtCreationParameters p;
p.DriverType = driverType;
p.WindowSize = windowSize;
p.Bits = (u8)bits;
p.Fullscreen = fullscreen;
p.Stencilbuffer = stencilbuffer;
p.Vsync = vsync;
p.EventReceiver = res;
return createDeviceEx(p);
}
namespace core
{
const matrix4 IdentityMatrix(matrix4::EM4CONST_IDENTITY);
}
namespace video
{
SMaterial IdentityMaterial;
}
} // end namespace irr
#if defined(_IRR_WINDOWS_API_)
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved )
{
// _crtBreakAlloc = 139;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
#if defined(_DEBUG) && !defined(__GNUWIN32__) && !defined(__BORLANDC__) && !defined (_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)
_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_)