Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2011-11-05 07:29:37 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2011-11-05 07:29:37 +0400
commita71e2c498cbb3c1ec077e38e0fcb8ee1581e4d6b (patch)
tree0142045b5607a9e02bf4f1837e8d459a10c4f231 /source/blender/gpu
parentcc7e79f37272c9e9565d6eb456138a6f07fea9fc (diff)
GPU Buffers
Small type cleanup, use `GPU_Buffers *' rather than `void *'. Should be no functional changes.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_buffers.h13
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c16
2 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 7dabb9898cc..5e0eff69047 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -161,17 +161,18 @@ void GPU_buffer_unbind(void);
int GPU_buffer_legacy( struct DerivedMesh *dm );
/* Buffers for non-DerivedMesh drawing */
-void *GPU_build_mesh_buffers(struct GHash *map, struct MVert *mvert,
+typedef struct GPU_Buffers GPU_Buffers;
+GPU_Buffers *GPU_build_mesh_buffers(struct GHash *map, struct MVert *mvert,
struct MFace *mface, int *face_indices,
int totface, int *vert_indices, int uniq_verts,
int totvert);
-void GPU_update_mesh_buffers(void *buffers, struct MVert *mvert,
+void GPU_update_mesh_buffers(GPU_Buffers *buffers, struct MVert *mvert,
int *vert_indices, int totvert);
-void *GPU_build_grid_buffers(struct DMGridData **grids,
+GPU_Buffers *GPU_build_grid_buffers(struct DMGridData **grids,
int *grid_indices, int totgrid, int gridsize);
-void GPU_update_grid_buffers(void *buffers_v, struct DMGridData **grids,
+void GPU_update_grid_buffers(GPU_Buffers *buffers_v, struct DMGridData **grids,
int *grid_indices, int totgrid, int gridsize, int smooth);
-void GPU_draw_buffers(void *buffers);
-void GPU_free_buffers(void *buffers);
+void GPU_draw_buffers(GPU_Buffers *buffers);
+void GPU_free_buffers(GPU_Buffers *buffers);
#endif
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index d833fb5eb04..22cae058b2a 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1279,7 +1279,7 @@ typedef struct {
short no[3];
} VertexBufferFormat;
-typedef struct {
+struct GPU_Buffers {
/* opengl buffer handles */
GLuint vert_buf, index_buf;
GLenum index_type;
@@ -1297,9 +1297,9 @@ typedef struct {
int gridsize;
unsigned int tot_tri, tot_quad;
-} GPU_Buffers;
+};
-void GPU_update_mesh_buffers(void *buffers_v, MVert *mvert,
+void GPU_update_mesh_buffers(GPU_Buffers *buffers_v, MVert *mvert,
int *vert_indices, int totvert)
{
GPU_Buffers *buffers = buffers_v;
@@ -1336,7 +1336,7 @@ void GPU_update_mesh_buffers(void *buffers_v, MVert *mvert,
buffers->mvert = mvert;
}
-void *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
+GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
int *face_indices, int totface,
int *vert_indices, int tot_uniq_verts,
int totvert)
@@ -1416,7 +1416,7 @@ void *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
return buffers;
}
-void GPU_update_grid_buffers(void *buffers_v, DMGridData **grids,
+void GPU_update_grid_buffers(GPU_Buffers *buffers_v, DMGridData **grids,
int *grid_indices, int totgrid, int gridsize, int smooth)
{
GPU_Buffers *buffers = buffers_v;
@@ -1471,7 +1471,7 @@ void GPU_update_grid_buffers(void *buffers_v, DMGridData **grids,
//printf("node updated %p\n", buffers_v);
}
-void *GPU_build_grid_buffers(DMGridData **UNUSED(grids), int *UNUSED(grid_indices),
+GPU_Buffers *GPU_build_grid_buffers(DMGridData **UNUSED(grids), int *UNUSED(grid_indices),
int totgrid, int gridsize)
{
GPU_Buffers *buffers;
@@ -1561,7 +1561,7 @@ void *GPU_build_grid_buffers(DMGridData **UNUSED(grids), int *UNUSED(grid_indice
return buffers;
}
-void GPU_draw_buffers(void *buffers_v)
+void GPU_draw_buffers(GPU_Buffers *buffers_v)
{
GPU_Buffers *buffers = buffers_v;
@@ -1635,7 +1635,7 @@ void GPU_draw_buffers(void *buffers_v)
}
}
-void GPU_free_buffers(void *buffers_v)
+void GPU_free_buffers(GPU_Buffers *buffers_v)
{
if(buffers_v) {
GPU_Buffers *buffers = buffers_v;