Multiple Draw APIs

The API is presented in a draw API agnostic for the most part. If a plug-in is writing for entry points which are draw API specific then it should return the API that it is being used for. The interface supportedDrawAPIs() is provided for all relevant entry points.

If the device API that is returned does not include the current device API on which Viewport 2.0 is running; for example, if VP2 is running on OpenGL Core Profile mode, but supportedDrawAPIs() does not return MHWRender::kOpenGLCoreProfile, then a warning similar to the following appears:

Error: line 0: Failed to create evaluator for "drawdb/geometry/apiMesh" classification because the current drawing API isn't supported.

It is the responsibility of the plug-in to set up any dependent draw API libraries or interfaces. The SDK ships with specific versions of libraries for each supported draw API. Current dependent libraries are CgFx, DirectX11 and a pre-compiled DX11 effect runtime library. As the source code ships with the DirectX SDK, the pre-compiled DX11 effect library can be recompiled by plug-in writers and linked explicitly to their own plug-in. Current library versions are listed as part of the shipping resource notes.

Some notable draw API caveats are listed below. These are restrictions are imposed by the draw API libraries rather than a restriction in the Maya API.