Error before rendering starts

Problems building or running the engine, queries about how to use features etc.
Post Reply
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Error before rendering starts

Post by Slicky »

Ogre Version: :1.11:
Operating System: :Windows 10:
Render System: :D3D11 and GL3+:

I am working on upgrading to 1.11 from I think 1.09. I have tried both D3D11 and GL3+. I get this error before anything renders.

Image
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Error before rendering starts

Post by paroj »

the exception is D3D11 specific, which issue do you get with GL3+? Also does this only happen with your built or also with the prebuild SampleBrowser available here: https://bintray.com/ogrecave/ogre/downl ... 15-x64.zip
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

I believe that I get the same error with both renderers. I will check later. I will also try the prebuilt samples.

I was using some rtss but commented it out in my coffee just to get something running. Could it be related to that.

The error message is very cryptic and doesn't really point me in the direction of what I need to fix.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

The sample browser works fine both with D3D11 and GL3+.

I suspect it has something to do with how I am starting my app. The old configure dialog is now in Ogrebites so I just used the dialog call but didn't derive from Ogrebites. The config dialog works and saves the cfg but so far no rendering. I will try re enabling RTSS to see if it's related.

There is nothing obvious in the log file to me.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Error before rendering starts

Post by paroj »

Slicky wrote: Sat Aug 18, 2018 9:55 am I will try re enabling RTSS to see if it's related.
ah.. both GL3+ and D3D11 require shaders to render something - you must provide them manually for all of your materials or let the RTSS generate them automatically for you.
There should be an assert in SceneManager catching this early on though..
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

I gave up trying to modify my code too much and just derived from OgreBites. It could well be the RTSS. I don't remember seeing an assert though.

I will advise once I make more progress.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

OK so I finished deriving from OgreBItes and am now getting the same error.

From what I read in your prior post I don't have to do anything special with my existing materials?

I get the same error with GL3+ and D3D11. Resources seem to be loading.

I am using MyGui.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

I am getting this error:
File: S:\OGRE\RenderSystems\Direct3D11\src\Og...ceResource.cpp
Line: 59

Expression: mResources.empty()

It must be something weird that I am doing. Even though I derive from OgreBites I had to call my prior loadresources function to get the resources to show in the ogre.log. Apparently they somehow aren't loading or loading correctly.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Error before rendering starts

Post by paroj »

did you follow this tutorial? https://ogrecave.github.io/ogre/api/latest/setup.html

also does the code referenced in there work for you?
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

Yes I followed something on the wiki very similar or that one. I can't check now.

My guess is that it has something to do with loading resources. The OgreBites has a specific path for resources I think. My directory structure is different so I have some resource additions that I do. The log seems to parse the resource files but the error above seems to suggests resources for the renderer are empty. Is that a RTSS thing or a resource files not being found?

I just spent another hour playing with it and still can't get anything to render.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Error before rendering starts

Post by paroj »

Slicky wrote: Wed Aug 22, 2018 1:47 pm The OgreBites has a specific path for resources I think. My directory structure is different so I have some resource additions that I do. The log seems to parse the resource files but the error above seems to suggests resources for the renderer are empty. Is that a RTSS thing or a resource files not being found?
Yes the RTSS needs its shaderlib to be added as resource location. Probably this is what you are stubling over.

OgreBites::ApplicationContext takes care of this for you, but it requires a specific data structure from your side, see:
- https://github.com/OGRECave/ogre/blob/m ... #L648-L664
- https://github.com/OGRECave/ogre/blob/m ... cfg.in#L11

I think you are doing too many steps at once as you are porting from 1.9 to 1.11 and from D3D9 to D3D11 and at this from non-RTSS to RTSS codepaths.

Try porting to 1.11 with D3D9 or 1.9 with RTSS as an intermediate step. Alternatively start with the Bootstrap example and transfer it to your project piece by piece.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

I will try all of that. Thanks for the info. It seems weird to have such a problem of having resources load after it working for a long time. Upgrading is fun :D
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

Ok still plugging away. I used the code from OgreApllicationContext and Bootstrap.

I specified the resource locations in my resource file for the RTSS files and they seemed to get parsed.

My current error is:
20:24:36: Ogre::InvalidStateException::InvalidStateException: RenderSystem does not support FixedFunction, but technique of 'Scene_Material' has no Vertex Shader. Use the RTSS or write custom shaders. in SceneManager::_setPass at S:\OGRE\OgreMain\src\OgreSceneManager.cpp (line 920)
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

OK a little more progress. It seems that if I don't use MyGui I don't get a crash. From what I have read MyGui should work with 1.11.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Error before rendering starts

Post by paroj »

while MyGUI works with 1.11, it does not yet take care of connecting to the RTSS which is a prerequisite for GL3+ and D3D11. Try using D3D9 or GL.
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Re: Error before rendering starts

Post by Slicky »

Ok thanks. I will give that a spin.
Post Reply