Dev:2.5/Source/Viewport/Design

提供: wiki
移動先: 案内検索

The new viewport is designed to leverage the GPU renderer's capabilities and allow users and programmers to use modern capabilities of OpenGL.

The design is based around the data request system. Basically, the viewport renderer drawing code requests data from blender objects and entities, and the entities are responsible for providing the renderer with those data.

The new viewport is optimized to minimize state changes and as such, materials are sorted first before rendering.

The following flow graph outlines the new viewport pipeline:

To make this possible there are a few guidelines we try to follow:

  • Material state should depend upon object state as little as possible. When it -does- depend on object state, we try to make it so drawing is affected without having to recompile a shader. That.