The footPrintNode plugin is an example of using MPxLocator. It has been updated to provide a simple Viewport 2.0 implementation as well as an example of using MPxDrawOverride. Not all draw modes are supported, but it shows how MPxDrawOverride is meant to be used.
The apiMeshShape plugin is an example of how to implement a custom Maya shape using MPxSurfaceShape. It has been updated to include how to use MPxGeometryOverride in order to provide vertex data, index data, and custom render items to Viewport 2.0 for drawing a custom Maya shape with arbitrary shader assignments.
hwPhongShader is an example of how to implement a custom hardware shader using MPxHwShaderNode. It has been updated to include how to use MPxShaderOverride to implement a complete custom shading effect for Viewport 2.0. In its primary mode, it uses the simple drawGeometry interface to allow Viewport 2.0 to handle geometry drawing after it sets up the shader. However, it also has an alternate implementation that shows how to query the actual geometry resource handles through the MGeometry interface in order to do custom binding and drawing.
Maya’s CgFX plugin has been updated to support Viewport 2.0 through the MPxShaderOverride interface. Unlike hwPhongShader above, this is a non-trivial example of using the new API to produce fast and interesting custom shading. The plugin makes extensive use of MDrawContext in order to set and maintain state as the plugin renders the custom CgFX file shaders.
The viewRenderOverride plugin is an example of how to override the viewport drawing to produce various effects on top of the standard draw. This makes use of many new API classes including: MRenderer, MRenderOverride, MRenderOperation (and several of its derived classes), MCameraOverride and MRenderTarget.