IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Ogre Discussion :

Impossible de lancer le moindre example


Sujet :

Ogre

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 19
    Points : 15
    Points
    15
    Par défaut Impossible de lancer le moindre example
    Bonjour à tous.

    Aujourd'hui j'ai décidé de me lancer dans l'utilisation du moteur 3D Ogre.
    Auparavant, j'avais installé les démos pour voir ce que ca donné, et les fichiers exécutables fournis ici fonctionne. J'ai donc ensuite installé OgreSDK pour Visual studio 2008, ajouté les bons répertoires dans l'IDE Visual Studio, j'ai crée mon projet comme indiqué dans les tutoriaux, ajouté les DLL de ogre et le programme compile bien.
    Cependant, a chaque fois que je lance le programme compilé il plante avant que la moindre chose s'affiche, je n'arrive pas a comprendre pourquoi. Si quelqu'un a une idée d'ou ca pourrait venir?

    Le code est le suivant, c'est celui de l'exemple fournis par le wiki d’ogre:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    #include "ExampleApplication.h"
     
    // Declare a subclass of the ExampleFrameListener class
    class MyListener : public ExampleFrameListener
    {
    public:
        MyListener(RenderWindow* win, Camera* cam) : ExampleFrameListener(win, cam)
        {
        }
     
        bool frameStarted(const FrameEvent& evt)
        {
            return ExampleFrameListener::frameStarted(evt);        
        }
     
        bool frameEnded(const FrameEvent& evt)
        {
            return ExampleFrameListener::frameEnded(evt);        
        }
    };
     
    // Declare a subclass of the ExampleApplication class
    class SampleApp : public ExampleApplication 
    {
    public:
       SampleApp() 
       {
       }
     
    protected:
       // Define what is in the scene
       void createScene(void)
       {
           // put your scene creation in here
       }
     
       // Create new frame listener
       void createFrameListener(void)
       {
           mFrameListener = new MyListener(mWindow, mCamera);
           mRoot->addFrameListener(mFrameListener);
       }
    };
     
    #ifdef __cplusplus
    extern "C" {
    #endif
     
    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 
    #define WIN32_LEAN_AND_MEAN 
    #include "windows.h" 
    INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 
    #else 
    int main(int argc, char **argv) 
    #endif 
    {
        // Instantiate our subclass
        SampleApp myApp;
     
        try {
            // ExampleApplication provides a go method, which starts the rendering.
            myApp.go();
        }
        catch (Ogre::Exception& e) {
    #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 
            MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
    #else
            std::cerr << "Exception:\n";
            std::cerr << e.getFullDescription().c_str() << "\n";
    #endif
            return 1;
        }
     
    return 0;
    }
     
    #ifdef __cplusplus
    }
    #endif

  2. #2
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 19
    Points : 15
    Points
    15
    Par défaut
    Petite mise a jour, il y a un semblant de log dans el repertoire, mais son nom est tout bizare, le fichier est : œ"ø+" et son contenue est le suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    13:05:49: Creating resource group General
    13:05:49: Creating resource group Internal
    13:05:49: Creating resource group Autodetect
    13:05:49: SceneManagerFactory for type 'DefaultSceneManager' registered.
    13:05:49: Registering ResourceManager for type Material
    13:05:49: Registering ResourceManager for type Mesh
    13:05:49: Registering ResourceManager for type Skeleton
    13:05:49: MovableObjectFactory for type 'ParticleSystem' registered.
    13:05:49: OverlayElementFactory for type Panel registered.
    13:05:49: OverlayElementFactory for type BorderPanel registered.
    13:05:49: OverlayElementFactory for type TextArea registered.
    13:05:49: Registering ResourceManager for type Font
    13:05:49: ArchiveFactory for archive type FileSystem registered.
    13:05:49: ArchiveFactory for archive type Zip registered.
    13:05:49: FreeImage version: 3.10.0
    13:05:49: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
    13:05:49: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
    13:05:49: DDS codec registering
    13:05:49: Registering ResourceManager for type HighLevelGpuProgram
    13:05:49: Registering ResourceManager for type Compositor
    13:05:49: MovableObjectFactory for type 'Entity' registered.
    13:05:49: MovableObjectFactory for type 'Light' registered.
    13:05:49: MovableObjectFactory for type 'BillboardSet' registered.
    13:05:49: MovableObjectFactory for type 'ManualObject' registered.
    13:05:49: MovableObjectFactory for type 'BillboardChain' registered.
    13:05:49: MovableObjectFactory for type 'RibbonTrail' registered.

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut
    salut,

    as tu mis les fichiers de configuration dans le repertoire de ton projet . il y en a 3 ogre, plugins et ressource je crois . avec l' extention cfg


    lorsque ogre plante sans messages erreurs, ça vient souvent d'un mauvais "parsing"

    regarde dans ton fichier ogre de configuration


    bon courage !

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 19
    Points : 15
    Points
    15
    Par défaut
    Citation Envoyé par Asmod_D Voir le message
    salut,

    as tu mis les fichiers de configuration dans le repertoire de ton projet . il y en a 3 ogre, plugins et ressource je crois . avec l' extention cfg


    lorsque ogre plante sans messages erreurs, ça vient souvent d'un mauvais "parsing"

    regarde dans ton fichier ogre de configuration


    bon courage !
    Etant un peu neophite, je comprend pas trop ce que signifie "parsing", cependant, j'ai bien mis les fichiers avec les dll la ou se trouve l'exe mais je suis pas sure de leur contenue que voici:
    resources.cfg
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    # Resource locations to be added to the 'boostrap' path
    # This also contains the minimum you need to use the Ogre example framework
    [Bootstrap]
    Zip=C:/OgreSDK/media/packs/OgreCore.zip
     
    # Resource locations to be added to the default path
    [General]
    FileSystem=C:/OgreSDK/media
    FileSystem=C:/OgreSDK/media/fonts
    FileSystem=C:/OgreSDK/media/materials/programs
    FileSystem=C:/OgreSDK/media/materials/scripts
    FileSystem=C:/OgreSDK/media/materials/textures
    FileSystem=C:/OgreSDK/media/models
    FileSystem=C:/OgreSDK/media/overlays
    FileSystem=C:/OgreSDK/media/particle
    FileSystem=C:/OgreSDK/media/gui
    FileSystem=C:/OgreSDK/media/DeferredShadingMedia
    FileSystem=C:/OgreSDK/media/PCZAppMedia
    Zip=C:/OgreSDK/media/packs/cubemap.zip
    Zip=C:/OgreSDK/media/packs/cubemapsJS.zip
    Zip=C:/OgreSDK/media/packs/dragon.zip
    Zip=C:/OgreSDK/media/packs/fresneldemo.zip
    Zip=C:/OgreSDK/media/packs/ogretestmap.zip
    Zip=C:/OgreSDK/media/packs/skybox.zip
    quake3settings.cfg
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Pak0Location: C:/OgreSDK/Media/packs/chiropteraDM.pk3 
    Map: maps/chiropteradm.bsp
    Plugins.cfg
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # Defines plugins to load
     
    # Define plugin folder
    PluginFolder=.
     
    # Define plugins
    Plugin=RenderSystem_Direct3D9
    Plugin=RenderSystem_GL
    Plugin=Plugin_ParticleFX
    Plugin=Plugin_BSPSceneManager
    Plugin=Plugin_CgProgramManager
    Plugin=Plugin_PCZSceneManager.dll
    Plugin=Plugin_OctreeZone.dll
    Plugin=Plugin_OctreeSceneManager
    media.cfg
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    Mesh=ogrehead.mesh
    Mesh=geosphere4500.mesh
    Mesh=razor.mesh
    Mesh=knot.mesh
    Mesh=RZR-002.mesh
    Mesh=geosphere8000.mesh
    Mesh=sphere.mesh
     
    CubeMap=cubescene.jpg
    CubeMap=early_morning.jpg
    CubeMap=cubemap.jpg
    CubeMap=morning.jpg
    CubeMap=cloudy_noon.jpg
    CubeMap=evening.jpg
    CubeMap=stormy.jpg
    CubeMap=stevecube.jpg
    Je precise que je suis sous windows vista, et que ogre est donc installé dans C:/OgreSDK

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut
    "parsing" , ogre utilise un parser, cela permet de lire des fichiers de type texte exemple le "xml" pour plusieurs possibilités.

    en exemple le fichier plugin.cfg , ogre parse le fichier pour savoir quels sont le ou les plugins que ogre utilisera pour le programme.

    regarde dans le fichier de document ogre qui est generé a chaque fois que tu execute le programme , il se trouve dans le repertoire de ton executable.

  6. #6
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2006
    Messages
    1 294
    Détails du profil
    Informations personnelles :
    Localisation : Royaume-Uni

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 294
    Points : 1 543
    Points
    1 543
    Par défaut
    Salut,

    Essaye d'utiliser Dependency Walker (installé avec visual studio si ce n'est pas une version express ou sinon avec le microsoft platform SDK) sur l'exécutable créé pour voir si des DLL ne manquent pas.

    MAT.

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    19
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 19
    Points : 15
    Points
    15
    Par défaut
    Bon finallement, apres avoir tout reinstaller 5 ou 6 fois d'affilé, ca a fini par marcher ^^
    Vive les joies de l'informatique :p

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 1
    Dernier message: 01/03/2009, 20h51
  2. [RMI] Impossible de lancer mon serveur
    Par Dahu dans le forum API standards et tierces
    Réponses: 11
    Dernier message: 11/06/2006, 09h17
  3. [Install]Impossible de lancer eclipse
    Par kaishef dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 10/05/2005, 10h02
  4. [Plugin Tomcat] Impossible de lancer TOMCAT
    Par Dahu dans le forum Eclipse Java
    Réponses: 7
    Dernier message: 03/03/2005, 10h40
  5. impossible de lancer xmlrad
    Par hachach dans le forum XMLRAD
    Réponses: 3
    Dernier message: 07/09/2004, 16h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo