source: OGRE/trunk/ogrenew/Samples/Terrain/src/Terrain.cpp @ 692

Revision 692, 1.4 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10You may use this sample code for anything you like, it is not covered by the
11LGPL like the rest of the engine.
12-----------------------------------------------------------------------------
13*/
14
15/**
16    @file
17        Terrain.cpp
18    @brief
19        Shows OGRE's terrain rendering plugin.
20*/
21
22#include "Terrain.h"
23
24#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
25#define WIN32_LEAN_AND_MEAN
26#include "windows.h"
27#endif
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
34INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
35#else
36int main(int argc, char *argv[])
37#endif
38{
39    // Create application object
40    TerrainApplication app;
41
42    SET_TERM_HANDLER;
43   
44    try {
45        app.go();
46    } catch( Ogre::Exception& e ) {
47#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
48        MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
49#else
50        std::cerr << "An exception has occured: " <<
51            e.getFullDescription().c_str() << std::endl;
52#endif
53    }
54
55    return 0;
56}
57
58#ifdef __cplusplus
59}
60#endif
Note: See TracBrowser for help on using the repository browser.