CaseyB
23-03-2006 17:05:54
Updating to 1.2RC1 broke my PagingLandscape app and I am having a heck of a time getting it working again! Has anyone else had this trouble? I am getting all kinds of asserts from inside the paginglandscape.dll!
CaseyB
23-03-2006 17:05:54
tuan kuranes
23-03-2006 20:44:23
Updating to 1.2RC1 broke my PagingLandscape app and I am having a heck of a time getting it working again! Has anyone else had this trouble?
am getting all kinds of asserts from inside the paginglandscape.dll
CaseyB
23-03-2006 20:55:40
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
and it looks like thisGpuProgramManager& GpuProgramManager::getSingleton(void)
{
assert( ms_Singleton ); return ( *ms_Singleton );
}
in ogregpuprogrammanager.cpp after being called in the bool CgProgram::isSupported(void)
method.
tuan kuranes
23-03-2006 21:29:44
CaseyB
24-03-2006 16:32:50
GpuProgramManager::getSingleton()
that fails. Aparently there is no instance of the GpuProgramManager! Is there something I am doing wrong in code that could cause this? Here is the code for my main class so you can see how I initialize everything.OgreApp::OgreApp()
{
root = new Root;
// Load resource paths from config file
ConfigFile cf;
cf.load("resources.cfg");
// Go through all sections & settings in the file
ConfigFile::SectionIterator seci = cf.getSectionIterator();
String secName, typeName, archName;
while (seci.hasMoreElements())
{
secName = seci.peekNextKey();
ConfigFile::SettingsMultiMap *settings = seci.getNext();
ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i)
{
typeName = i->first;
archName = i->second;
ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
// Initialise, parse scripts etc
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
root->showConfigDialog(); // This asks the user
win = root->initialise(true, "Ogre Framework");
sceneMgr = root->createSceneManager("PagingLandScapeSceneManager", "MainSceneManager");
sceneMgr->setWorldGeometry("terrain.cfg");
camera = sceneMgr->createCamera("SimpleCamera");
viewPort = root->getAutoCreatedWindow()->addViewport(camera);
viewPort->setBackgroundColour(ColourValue(0,0,0));
camera->setAspectRatio(Real(viewPort->getActualWidth()) / Real(viewPort->getActualHeight()));
camera->setNearClipDistance(1.0);
createScene();
listener = new DeviceListener(win, camera, sceneMgr,mainActor);
root->addFrameListener(listener);
}
OgreApp::~OgreApp()
{
delete listener;
delete mainActor;
delete root;
}
void OgreApp::start()
{
root->startRendering(); // will not continue until a frame listener returns false.
// eg from pressing escape in this example
}
void OgreApp::createScene()
{
// Create a Sky Dome
sceneMgr->setSkyDome(true, "Sky", 5, 8, 4000, true);
// Setup the ambient light
sceneMgr->setAmbientLight(ColourValue(0.5f, 0.5f, 0.5f));
// Setup Shadows
sceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_MODULATIVE);
mainActor = new MainActor(camera, true, "DC10.mesh", "MainActor", Vector3::ZERO, Vector3(0, 500, 1000), 1.0f);
mainActor->setPosition(Vector3(0, 150, 300));
light = sceneMgr->createLight("sun");
light->setType(Light::LT_DIRECTIONAL);
light->setDirection(-1,-1,-1);
// Set up Overlay
// get the font manager
FontManager &fontMgr = FontManager::getSingleton();
// create a font resource
ResourcePtr font = fontMgr.create("MyFont","General");
// set as truetype
font->setParameter("type","truetype");
// set the .ttf file name
font->setParameter("source", "ARIAL.TTF");
// set the size
font->setParameter("size","16");
// set the dpi
font->setParameter("resolution","96");
// load the ttf
font->load();
// get the overlay manager
OverlayManager& overlayMgr = OverlayManager::getSingleton();
// Create a panel
Ogre::OverlayContainer* panel = static_cast<OverlayContainer*>(
overlayMgr.createOverlayElement("Panel", "PanelName"));
panel->setMetricsMode(Ogre::GMM_PIXELS);
panel->setPosition(10, 10);
panel->setDimensions(100, 100);
// Create a text area
TextAreaOverlayElement* textArea = static_cast<TextAreaOverlayElement*>(
overlayMgr.createOverlayElement("TextArea", "TextAreaName"));
textArea->setMetricsMode(Ogre::GMM_PIXELS);
textArea->setPosition(0, 0);
textArea->setDimensions(100, 100);
textArea->setCharHeight(16);
// set the font name to the font resource that you just created.
textArea->setFontName("MyFont");
// say something
textArea->setCaption("Hello, World!");
// Create an overlay, and add the panel
Ogre::Overlay* overlay = overlayMgr.create("AverageFps");
overlay->add2D(panel);
// Add the text area to the panel
panel->addChild(textArea);
// Show the overlay
overlay->show();
}
tuan kuranes
24-03-2006 16:39:50
CaseyB
24-03-2006 17:27:35
# Defines plugins to load
# Define plugin folder
PluginFolder=.
# Define plugins
Plugin=RenderSystem_Direct3D9
Plugin=RenderSystem_GL
Plugin=Plugin_CgProgramManager
Plugin=Plugin_PagingLandScapeSceneManager2_d
Make sure you removed ogre.cfg too as format as changed.
CaseyB
24-03-2006 19:15:45
tuan kuranes
24-03-2006 19:34:46
What do you mean by this? Remove it from where?
CaseyB
24-03-2006 21:38:56
RenderSystemCapabilities* getCapabilities(void) const { return mCapabilities; }
in OgreRenderSystem.h. Also I deleted the ogre.cfg file, but the app doesn't run long enough to create a new one.
tuan kuranes
25-03-2006 09:44:46
CaseyB
25-03-2006 15:11:00
CaseyB
27-03-2006 19:31:53
-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: TextAreaOverlayElement::setFontName
Description: Could not find font BlueHighway.
File: c:\development\ogrenew\ogremain\src\ogretextareaoverlayelement.cpp
Line: 337
Stack unwinding: <<beginning of stack>>
13:13:57: An exception has been thrown!
CaseyB
27-03-2006 23:31:45