Problems building or running the engine, queries about how to use features etc.
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Thu Mar 04, 2021 2:50 pm
Ogre Version: 1.12
The following code was working with Mogre:
Code: Select all
MaterialPtr ret;
ret = baseMat.clone(matName);
ret.getTechnique(0).getPass(0).getVertexProgramParameters().setNamedConstant("isBump", 0f);
However in Ogre there's no method called
setNamedConstant() inside
VertexProgramParameters and
FragmentProgramParameters . Is there any workaround?
loath
Platinum Sponsor
Posts: 290 Joined: Tue Jan 17, 2012 5:18 am
x 67
Quote
0
login to like this post
Post
by loath » Thu Mar 04, 2021 5:22 pm
just realized you said C#
use the arrow operator instead of the dot:
Code: Select all
auto vparams = pass->getVertexProgramParameters ();
vparams->setNamedConstant ("worldScale", scale);
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Thu Mar 04, 2021 5:39 pm
Unfortunately this doesn't work in C#
loath
Platinum Sponsor
Posts: 290 Joined: Tue Jan 17, 2012 5:18 am
x 67
Quote
0
login to like this post
Post
by loath » Thu Mar 04, 2021 6:09 pm
ah makes sense. i'm sure paroj will have a fix shortly if it's broken.
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Fri Mar 05, 2021 1:09 pm
Will this be fixed? Or there are few workarounds I can do?
paroj
OGRE Team Member
Posts: 1994 Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:
Quote
1
login to like this post
Post
by paroj » Fri Mar 05, 2021 1:38 pm
yes, its fixed in master. However, you should familiarize yourself with SWIG and how to build Ogre locally, so you can fix these minor issues on your own (and create a PR when you do).
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Fri Mar 05, 2021 1:49 pm
Thank you once again, paroj!
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Fri Mar 05, 2021 3:14 pm
paroj wrote: ↑ Fri Mar 05, 2021 1:38 pm
yes, its fixed in master. However, you should familiarize yourself with SWIG and how to build Ogre locally, so you can fix these minor issues on your own (and create a PR when you do).
I had this error when selecting I wanted to build the C# stuff
Code: Select all
CMake Warning at Components/Csharp/CMakeLists.txt:3 (message):
Csharp Component disabled because SWIG or Csharp was not found
I've downloaded SWIG but where should I put it to make it work?
paroj
OGRE Team Member
Posts: 1994 Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:
Quote
0
login to like this post
Post
by paroj » Fri Mar 05, 2021 3:20 pm
r0ut
Halfling
Posts: 44 Joined: Mon Feb 22, 2021 6:25 pm
x 2
Quote
0
login to like this post
Post
by r0ut » Fri Mar 05, 2021 5:44 pm
Thanks! I've installed SWIG through Chocolatey and worked like a charm!
However, the Visual Studio project doesn't have any .cs extension file BUT there's an Ogre.dll inside csharp folder. Is this DLL up to date or should I compile it again somewhere?