Crash on loading shaders.

Problems building or running the engine, queries about how to use features etc.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18

Crash on loading shaders.

Post by PolyVox »

Hi, I'm in the process of moving my program from the Dagon (using the example framework) to Eihort (*not* using the example framework). Somewhere I've broken something because I can't now use shaders as the application crashes on startup (if I use materials without shaders it's fine).

I get the following mesage:

Image

I think it's pointing me to OgreGPUProgramManager.cpp, Line 42 of which reads:

Code: Select all

40: GpuProgramManager& GpuProgramManager::getSingleton(void)
41: {  
42:     assert( ms_Singleton );  return ( *ms_Singleton );  
43: }
So it looks to me like the GpuProgramManager hasn't been created. Is this something I should have done manually somehow? I've been following the guide at:

http://www.ogre3d.org/wiki/index.php/Pr ... et_Started

If it helps, the last few lines of my log file read:

Code: Select all

18:19:15: Added resource location 'resource' of type 'FileSystem' to resource group 'General'
18:19:15: Creating resource group GUI
18:19:15: Added resource location 'resource/gui.zip' of type 'Zip' to resource group 'GUI'
18:19:15: Added resource location 'c:\windows\fonts' of type 'FileSystem' to resource group 'GUI'
18:19:15: Initialising resource group General
18:19:15: Parsing scripts for resource group General
18:19:15: Parsing script Thermite.program
Any ideas?
genva
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1603
Joined: Wed Oct 20, 2004 7:54 am
Location: Beijing, China
x 1

Post by genva »

You need to create at least one render window before calls ResourceGroupManager::initialiseAllResourceGroups/initialiseResourceGroup.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18

Post by PolyVox »

genva wrote:You need to create at least one render window before calls ResourceGroupManager::initialiseAllResourceGroups/initialiseResourceGroup.
You were right :D So, there's actually an error in the tutorial. I'll add a note to the Wiki page.
psionprime
Kobold
Posts: 32
Joined: Wed Nov 03, 2004 5:32 am

Post by psionprime »

I made a follow up comment in the discussion section of the Wiki article you mentioned, esuvs. I just finished solving my input handler problem with embedded renderers and MFC apps (no OIS love here) when I saw the bug notice. I have to contend it is not a bug as I use the same sequence with no problems.

My test app varied from the article in that I decided I wanted to use a config file for the heck of it. When I copied over the sample resource.cfg, edited it to point to the full path back to the sample/media directory and tried a run, the app crapped out at the initialization. Eventually, I worked out that the [BOOTSTRAP] section was causing it. I commented it out and all is well.