[657] | 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 | \file
|
---|
| 16 | Transparency.cpp
|
---|
| 17 | \brief
|
---|
| 18 | Shows OGRE's transparency, or scene blending features.
|
---|
| 19 | \par
|
---|
| 20 | Note that this is a little rudimentary - it's because whilst
|
---|
| 21 | OGRE supports lots of blending options, the SceneManager has
|
---|
| 22 | to ensure the rendering order is correct when object transparency
|
---|
| 23 | is enabled. Right now this is not quite right in the default
|
---|
| 24 | manager so this scene is kept deliberately simple.
|
---|
| 25 | */
|
---|
| 26 |
|
---|
| 27 | #include "Transparency.h"
|
---|
| 28 |
|
---|
| 29 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
---|
| 30 | #define WIN32_LEAN_AND_MEAN
|
---|
| 31 | #include "windows.h"
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
| 34 | #ifdef __cplusplus
|
---|
| 35 | extern "C" {
|
---|
| 36 | #endif
|
---|
| 37 |
|
---|
| 38 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
---|
| 39 | INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
|
---|
| 40 | #else
|
---|
| 41 | int main(int argc, char ** argv)
|
---|
| 42 | #endif
|
---|
| 43 | {
|
---|
| 44 |
|
---|
| 45 | // Create application object
|
---|
| 46 | TransApplication app;
|
---|
| 47 |
|
---|
| 48 | try {
|
---|
| 49 | app.go();
|
---|
| 50 | } catch( Ogre::Exception& e ) {
|
---|
| 51 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
---|
| 52 | MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
|
---|
| 53 | #else
|
---|
| 54 | std::cerr << "An exception has occured: " << e.getFullDescription();
|
---|
| 55 | #endif
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | return 0;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
| 62 | #ifdef __cplusplus
|
---|
| 63 | }
|
---|
| 64 | #endif
|
---|