source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/OgreDemos/src/ReflectionTest/src/ReflectionTest.cpp @ 3255

Revision 3255, 1.7 KB checked in by szirmay, 15 years ago (diff)
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        Lighting.cpp
18    \brief
19        Shows lighting support in OGRE.
20*/
21
22
23
24#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
25#define WIN32_LEAN_AND_MEAN
26#include "windows.h"
27#endif
28
29#include "ReflectionTest.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35
36
37#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
38INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
39#else
40int main(int argc, char **argv)
41#endif
42{
43        std::vector<String> args = StringUtil::split(String(strCmdLine));       
44        for(int i = 0; i < args.size(); i += 2)
45        {
46                if(args[i] == "-o")
47                        currentObject = StringConverter::parseInt(args[i+1]);
48                else if (args[i] == "-s")
49                        scene = StringConverter::parseInt(args[i+1]);
50                else if(args[i] == "-m")
51                        currentMaterial = StringConverter::parseInt(args[i+1]);
52        }
53    // Create application object
54    RaytraceDemoApplication app;
55
56    try {
57        app.go();
58    } catch( Ogre::Exception& e ) {
59#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
60        MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
61#else
62        std::cerr << "An exception has occured: " << e.getFullDescription();
63#endif
64    }
65
66    return 0;
67}
68
69#ifdef __cplusplus
70}
71#endif
Note: See TracBrowser for help on using the repository browser.