Hi Oliver,
On Fri, 2006-03-10 at 12:51 +0100, [EMAIL PROTECTED]
wrote:
> Hi,
>
> I have a Problem with OpenSG 1.6 and .NET 2003 on Windows XP. I
> compiled OpenSG on my own. But when I want to compile my Project, I got
> an error. I use a GeoColor4f Object and I want to set the color value
> at a specified index with
> _elemsColors->getFieldPtr()->setValue(Color4f(1.0, 1.0, 0.5, 0.5f),
> index);
>
> And this is the compiler's error message:
>
> error C2039: 'setValue' is no element of 'osg::MField<FieldTypeT>'
> with [ FieldTypeT=osg::Color4f ]
>
>
> I looked into the MField.h and I found this one, which confuses me:
>
> #ifndef OSG_DISABLE_DEPRECATED
> void setValue (ArgumentType value, const UInt32 index);
> void addValue (ArgumentType value);
> #endif
>
> The funny thing is, that it works fine with Suse Linux 9.2 and gcc 3.4.3!
>
> Does anyone have an idea, why it doesn't work with Windows?
Hm, for some reason there must be a #define OSG_DISABLE_DEPRECATED
somewhere in your build, there is none in the source directly. If you
remove that it will work.
Alternatively you can use the array access method:
MFColor4f& c = *_elemsColors->getFieldPtr();
c[index] = Color4f(1.0, 1.0, 0.5, 0.5f);
Hope it helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users