[1.10.10] CG Materials don't work Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

[1.10.10] CG Materials don't work

Post by Pellaeon »

Hi,

I want to use CG shaders in my application. For a first test I tried the material from http://wiki.ogre3d.org/Getting+Started+ ... +Materials.
I added "Plugin=Plugin_CgProgramManager" to my cfg file and defined the material like in the above link. But it doesn't work. The ogre log says:
15:50:57: WARNING: material light_boden_OgreMax has no supportable Techniques and will be blank. Explanation:
Pass 0: vertex program CG_Test_Mat_VS cannot be used - not supported.
I have a nvidia 970 graphics card. So teh hardware should be sufficient.

So what's the problem?


Best regards

Pellaeon
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

Re: [1.10.10] CG Materials don't work

Post by paroj »

please attach the ogre.log
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: [1.10.10] CG Materials don't work

Post by Pellaeon »

The CG test material is 'light_boden_OgreMax'.

Attaching a file doesn't work. So you can find the file here: https://www-user.tu-chemnitz.de/~mschumi/Ogre.log
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

Re: [1.10.10] CG Materials don't work

Post by paroj »

is the Cg profile you are specifying one of:

Code: Select all

* Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
also please attach the full material and program definition of light_boden_OgreMax
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: [1.10.10] CG Materials don't work

Post by Pellaeon »

For testing purpose I use the material from the above ogre wiki url (http://wiki.ogre3d.org/Getting+Started+ ... +Materials)
paroj
OGRE Team Member
OGRE Team Member
Posts: 1995
Joined: Sun Mar 30, 2014 2:51 pm
x 1075
Contact:

Re: [1.10.10] CG Materials don't work

Post by paroj »

looks ok then. Do the Cg materials in the SampleBrowser work?
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: [1.10.10] CG Materials don't work

Post by Pellaeon »

Hi,

ok, I compiled the ogre solution with the examples and started the Normal Mapping example wit the athene.mesh.
The examples says it uses the "Example/Athene/NormalMap" material. This works fine. I use the DX9 renderer.

But how can I check which version of the vertex program is used (CG, glsl, unified)?

Is there some initialize work to do to use CG shaders? The CG.dll is available and the Plugin_CgProgramManager is loaded at startup of my program.

Regards

Pellaeon
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: [1.10.10] CG Materials don't work

Post by Pellaeon »

Ok,

I found the problem. :idea:
I embed Ogre into a wxWidgets application. Therefore I don't use the automatic creation of a render window of ogre. I used some code I found in the forum some time ago:

Code: Select all

m_renderWindow = m_ogreRoot->getRenderSystem()->_createRenderWindow("OgreWindow", width, height, false, &options);
m_ogreRoot->getRenderSystem()->_setRenderTarget(m_renderWindow);
But this code never calls oneTimePostWindowInit and so it never calls initialisePlugins. That's the problem :evil:
Post Reply