diff options
Diffstat (limited to 'source/blender/gpu/GPU_vertex_format.h')
-rw-r--r-- | source/blender/gpu/GPU_vertex_format.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_vertex_format.h b/source/blender/gpu/GPU_vertex_format.h index 113a3e894d0..7a271caf079 100644 --- a/source/blender/gpu/GPU_vertex_format.h +++ b/source/blender/gpu/GPU_vertex_format.h @@ -92,6 +92,16 @@ uint GPU_vertformat_attr_add( void GPU_vertformat_alias_add(GPUVertFormat *, const char *alias); int GPU_vertformat_attr_id_get(const GPUVertFormat *, const char *name); +/** + * This makes the "virtual" attribs with suffixes "0", "1", "2" to access triangle data in the vertex + * shader. + * + * IMPORTANT: + * - Call this before creating the vertex buffer and after creating all attributes + * - Only first vertex out of 3 has the correct information. Use flat output with GL_FIRST_VERTEX_CONVENTION. + **/ +void GPU_vertformat_triple_load(GPUVertFormat *format); + /* format conversion */ typedef struct GPUPackedNormal { |