Getting sky into ogre?

Problems building or running the engine, queries about how to use features etc.
Locked
rordude
Gnoblar
Posts: 15
Joined: Thu Nov 13, 2008 1:58 pm

Getting sky into ogre?

Post by rordude »

Can someone please put the "Scenemanager" into my source? I guess that is what is spose to set the game up, but I made the terrain into it a differant way, but can someone get the scenemanager into it so that I can add sky, and fog and stuff? Below is the current source.

Code: Select all

#include "Terrain.h"

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char *argv[])
#endif
{
    // Create application object
    TerrainApplication app;

    try {
        app.go();
    } catch( Ogre::Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
        MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
        std::cerr << "An exception has occured: " <<
            e.getFullDescription().c_str() << std::endl;
#endif
    }

    return 0;
}

#ifdef __cplusplus
}
#endif
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 51

Post by madmarx »

1/ did you read the forum rules? why don't you try to respect them?

2/ Ogre has nothing to do with game. It's just a advanced "3D model" displayer. If you wish to write a game, maybe you could look to "game engin" (instead of "3D engin") on google.

3/ Here is a good news :D : there is already a SceneManager in your code. If you look at the code you can read #include "Terrain.h". So all the code that is in the file Terrain.h is used by your program. And if you look at the go() function of the TerrainApplication class, you will see that the scenemanager is create through chooseSceneManager().

4/ I think Ogre is not the tool that your looking for : you need at least to know C++ basics (inheritance, syntax and OO stuff), and it is not a game engin. You could try to learn a programming langage first, and use it with a real game engin using that langage ?

Anyway read the forum rules.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

'Get' the SceneManager into it? C'mon, do it yourself, read the wiki. Learning is fun. :)
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

This is just a dump of the terrain sample demo (.cpp file) that comes with Ogre. The SceneManager is indeed added already, but not in that file. Do your homework first. Topic closed.
Image
Locked