Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_vertex_format.cc
| Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | |||||
| * For an attribute named "attr" you can access the next nth vertex using "attr{number}". | * For an attribute named "attr" you can access the next nth vertex using "attr{number}". | ||||
| * Use this function after specifying all the attributes in the format. | * Use this function after specifying all the attributes in the format. | ||||
| * | * | ||||
| * NOTE: This does NOT work when using indexed rendering. | * NOTE: This does NOT work when using indexed rendering. | ||||
| * NOTE: Only works for first attribute name. (this limitation can be changed if needed) | * NOTE: Only works for first attribute name. (this limitation can be changed if needed) | ||||
| * | * | ||||
| * WARNING: this function creates a lot of aliases/attributes, make sure to keep the attribute | * WARNING: this function creates a lot of aliases/attributes, make sure to keep the attribute | ||||
| * name short to avoid overflowing the name-buffer. | * name short to avoid overflowing the name-buffer. | ||||
| * */ | */ | ||||
| void GPU_vertformat_multiload_enable(GPUVertFormat *format, int load_count) | void GPU_vertformat_multiload_enable(GPUVertFormat *format, int load_count) | ||||
| { | { | ||||
| /* Sanity check. Maximum can be upgraded if needed. */ | /* Sanity check. Maximum can be upgraded if needed. */ | ||||
| BLI_assert(load_count > 1 && load_count < 5); | BLI_assert(load_count > 1 && load_count < 5); | ||||
| /* We need a packed format because of format->stride. */ | /* We need a packed format because of format->stride. */ | ||||
| if (!format->packed) { | if (!format->packed) { | ||||
| VertexFormat_pack(format); | VertexFormat_pack(format); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines | |||||