On 10/28/2009 06:32 AM, Stefan Dösinger wrote:

Am 27.10.2009 um 20:10 schrieb Rico Schüller:

Hi,

this patch series implements a couple of ID3D10EffectVariable::As*() functions (patches 2-11).
Do we have any tests for the As* behavior?

Most conversions don't make any sense, so if the app wants a constant buffer as a render target view returning a null obj is probably a sane thing. But ::AsString potentially makes sense for all objects, maybe in a similar way Object::ToString is used to obtain a String for debug output in Java.

This is a rather odd looking API - it actually looks a lot more like C# "as" operator than Java.ToString(). That's basically a safe cast, which returns NULL if the object is not of the type you're trying to cast.

...except that in C# it's a language operator that works on any pointer type.

Ivan



Reply via email to