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