MfxInputDef

This document currently is a largely undocumented draft so it is more informational to refer to the C API at the moment: Open Mesh Effect API Reference.

class MfxInputDef : public MfxBase

An input definition is manipulated during the MfxEffect::Describe action to tell the host what is expected to flow through the input at cook time. It differs from MfxInput that is the input instance during the cooking, in particular the input definition does not contain any mesh.

Public Functions

MfxInputDef &Label(const char *label)

Define the human readable label to display next to this input (in hosts supporting it).

MfxInputDef &RequestAttribute(const char *attachment, const char *name, int componentCount, const char *type, const char *semantic, bool mandatory)

Notify the host that the effect requires (if mandatory is true) or would make good use of a given attribute. If the attribute is mandatory, it is ensured to be present with at least componentCount components of the requested type. If not mandatory, it is the responsibility of this effect to check at cook time whether the attribute exist or not and whether it has enough components and the right type.

The semantics can be used to tell the intended use of the of the attribute to help the host suggest some attributes to send to the effect to the user. Possible values are kOfxMeshAttribSemanticTextureCoordinate, kOfxMeshAttribSemanticNormal, kOfxMeshAttribSemanticColor or kOfxMeshAttribSemanticWeight. It may also just be null.