kuscotopia
03-04-2013 15:05:28
Hi all. This is my first experience with OgreProcedural and I am getting a seg fault when I attempt to create a set of primitive meshes.
I first initialize ogre manually via:
Within createPrimitves I am currently attempting to create a sphere and a cube with the following code:
When I execute my program I do not survive the creation of the box. Instead my application segfaults somewhere within realizeMesh.
Any guidance as to what I am doing wrong? Thanks!
I first initialize ogre manually via:
if( rendering ){
return -EALREADY;
}
//Initialize ogre root
if( !root ){
root = new Root(plugin, config, logFile);
}
if( !log ){
log = Ogre::LogManager::getSingleton().getDefaultLog();
}
//Ensure Ogre is configured
if( !root->restoreConfig() && !root->showConfigDialog() ){
return -ENOTSUP;
}
if( !window ){
window = root->initialise( true, title );
}
root->getRenderSystem()->_initRenderTargets();
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
//Create primitive meshes
logNormal("Generating primitive meshes...");
createPrimitives();
retrun 0;
Within createPrimitves I am currently attempting to create a sphere and a cube with the following code:
Procedural::BoxGenerator().realizeMesh("box");
Procedural::SphereGenerator().realizeMesh("sphere");
When I execute my program I do not survive the creation of the box. Instead my application segfaults somewhere within realizeMesh.
Any guidance as to what I am doing wrong? Thanks!