Hello Sajjadul,
Sajjadul Islam wrote:
> Hello Josef,
>
> Thanks for that ......it worked except for the some warnings as follows:
>
> WARNING: SwitchMaterial::getState: choice index out of range!
> WARNING: SwitchMaterial::isMultiPass: choice index out of range!
> WARNING: SwitchMaterial::isTransparent: choice index out of range!
> WARNING: SwitchMaterial::isTransparent: choice index out of range!
> WARNING: SwitchMaterial::isMultiPass: choice index out of range!
>
>
> The above warnings repeat with the initial loading of the object until i
> press the keyboard event
> to set different material and after that keyboard event these warnings
> does not show up.
>
> switchMaterialCore->addMaterial(createToonScene());
> switchMaterialCore->addMaterial(createPhongScene());
>
> switchMaterialCore->setChoice(Switch::NONE);
^^^^^^^^^^^
this is the problem, the SwitchMaterial (as apposed to the Switch
NodeCore) does not have a value to select "nothing" -- it does not make
much sense to render an object with no material ;)
> endEditCP(switchMaterialCore, SwitchMaterial::MaterialsFieldMask |
> SwitchMaterial::ChoiceFieldMask);
>
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users