Пример #1
0
LWError	MaterialMixer::Load (const lwpp::LoadState &ls)
{
	LWError err = 0;
	while(LWID id = ls.Find(idroot))
	{
		switch( id )
		{
			case IO_CDIF: ls.read(Diffuse); break;

	    case IO_CSPC: ls.read(Specular); break;

	    case IO_CRFL: ls.read(Reflection); break;

	    case IO_CRFR: ls.read(Refraction); break;

			case IO_CTRN: ls.read(Transparency); break;

			default: break;
		}
		ls.End();
	}
	return err;
}
Пример #2
0
	virtual LWError	Load (const lwpp::LoadState &ls)
	{
		LWError err = 0;
		while(LWID id = ls.Find(idcomp))
		{
			switch( id )
			{
				case IO_MODE: Mode = (BlendingMode)ls.readInt(); break;

				case IO_OPAC: ls.read(*Opacity); break;

				default: break;
			}
			ls.End();
		}
		return err;
	}