Dev:2.8/Source/OpenGL/Vertex Attributes

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

OpenGL Refactoring: Derivedmesh and Vertex Attributes

Overview

GLSL shaders require attributes like normals, colors, texture coordinates, tangents. For GLSL draw mode there is already code for shaders to request certain attributes, but this system will become more generic so that all shaders used for drawing meshes can do this. See the shader design proposal.

The DerivedMesh and mesh drawing system in general should be simplified and made more flexible to support new draw modes in the future. Currently we have various functions for drawing edges faces, but they could be unified if vertex attribute requests are used everywhere (and a bunch of other changes are done as well). Ideally the derivedmesh drawing code shouldn't be much aware of the shading, and mainly be responsible for creating vertex buffers.

Fixed function vertex attributes like normals, colors and texture coordinates are deprecated, and should be replaced by generic vertex attributes.

Design

TBD