From 0a7020b4e60ef69e0e4b38aee31bfce385e594d8 Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Sat, 17 Nov 2018 07:13:11 +0100 Subject: mesa: Factor out struct gl_vertex_format. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Factor out struct gl_vertex_format from array attributes. The data type is supposed to describe the type of a vertex element. At this current stage the data type is only used with the VAO, but actually is useful in various other places. Due to the bitfields being used, special care needs to be taken for the glGet code paths. v2: Change unsigned char -> GLubyte. Use struct assignment for struct gl_vertex_format. Reviewed-by: Brian Paul Reviewed-by: Marek Olšák Signed-off-by: Mathias Fröhlich --- src/mesa/main/varray.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/main/varray.h') diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index 823e4f408b1..0be57971bd7 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -29,6 +29,12 @@ #include "bufferobj.h" +void +_mesa_set_vertex_format(struct gl_vertex_format *vertex_format, + GLubyte size, GLenum16 type, GLenum16 format, + GLboolean normalized, GLboolean integer, + GLboolean doubles); + /** * Returns a pointer to the vertex attribute data in a client array, -- cgit v1.2.3