diff options
Diffstat (limited to 'source/blender/gpu/GPU_buffers.h')
-rw-r--r-- | source/blender/gpu/GPU_buffers.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 12e66264661..779521aa00c 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -39,6 +39,8 @@ # define DEBUG_VBO(X) #endif +#include <stddef.h> + struct BMesh; struct CCGElem; struct CCGKey; @@ -50,7 +52,7 @@ struct PBVH; struct MVert; typedef struct GPUBuffer { - int size; /* in bytes */ + size_t size; /* in bytes */ void *pointer; /* used with vertex arrays */ unsigned int id; /* used with vertex buffer objects */ bool use_vbo; /* true for VBOs, false for vertex arrays */ @@ -58,12 +60,12 @@ typedef struct GPUBuffer { typedef struct GPUBufferMaterial { /* range of points used for this material */ - int start; - int totelements; - int totloops; - int *polys; /* array of polygons for this material */ - int totpolys; /* total polygons in polys */ - int counter; /* general purpose counter, initialize first! */ + unsigned int start; + unsigned int totelements; + unsigned int totloops; + unsigned int *polys; /* array of polygons for this material */ + unsigned int totpolys; /* total polygons in polys */ + unsigned int counter; /* general purpose counter, initialize first! */ /* original material index */ short mat_nr; @@ -106,23 +108,22 @@ typedef struct GPUDrawObject { #endif int colType; - int index_setup; /* how indices are setup, starting from start of buffer or start of material */ GPUBufferMaterial *materials; int totmaterial; - int tot_triangle_point; - int tot_loose_point; + unsigned int tot_triangle_point; + unsigned int tot_loose_point; /* different than total loops since ngons get tesselated still */ - int tot_loop_verts; + unsigned int tot_loop_verts; /* caches of the original DerivedMesh values */ - int totvert; - int totedge; + unsigned int totvert; + unsigned int totedge; - int loose_edge_offset; - int tot_loose_edge_drawn; - int tot_edge_drawn; + unsigned int loose_edge_offset; + unsigned int tot_loose_edge_drawn; + unsigned int tot_edge_drawn; } GPUDrawObject; /* currently unused */ |