API Guide > Viewport 2.0 API >

# Overview of the Viewport 2.0 API

Maya 2012 introduced a new set of API classes for defining custom drawing, shading and effects in both Viewport 2.0 and Hardware Renderer 2.0 (the new batch/render view version of Viewport 2.0).

Maya’s Viewport 2.0 represents a brand-new rendering architecture in Maya that has been written from the ground up to deliver high-performance on large scenes on top of a programmable shader system offering high-quality per-pixel lighting and effects. This, unfortunately, makes it incompatible with many of the existing Maya API classes, due to their dependence on system memory geometry data, C++ driven rendering, and high state switching overheads. As a result, most existing plug-ins will need to be updated to support the new API classes in order to work correctly in Viewport 2.0.

This section introduces the new classes and highlights the migration paths from the old API to the new one. In most cases, it should be possible to write plug-in nodes that simultaneously implement both the new and old APIs where required, thus maintaining a single plug-in that will work in both viewports while artists, tools and pipelines are migrated to Viewport 2.0.

This discussion of the new API is broken down into the following subsections:

- Data Classes - the objects which describe and provide access to the geometry and shaders in the scene.
- Scene Overrides - the interfaces used to define custom drawing, shading and effects within the scene.
- Rendering Overrides - the objects used to define custom rendering, multi-pass effects, and filtering.
- Framework Classes - the objects that provide services and device state information to plug-ins.

Following this, there are two subsections to help accelerate your transition to the new API:

- Transition Guide - tips on moving from legacy interfaces to the new Viewport 2.0 API.
- Devkit Samples - a brief overview of updated devkit samples using the Viewport 2.0 API.

All of the new classes reside in a new namespace within the Maya API called MHWRender (all references to class names in this document assume the namespace). This makes it easy to locate all the classes related to viewport and batch hardware rendering and also makes it easy to differentiate them from the older hardware API classes which are not supported in Viewport 2.0 and Hardware Renderer 2.0.

#### Topics in this section

- Data Classes
- Scene Overrides
- Rendering Overrides
- Framework Classes
- Transition Guide
- Devkit Samples