[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43083] trunk/blender/source/blender/gpu: Remove some silly variable copies that stuck around from a previous refactor .

Nicholas Bishop nicholasbishop at gmail.com
Mon Jan 2 20:01:20 CET 2012


Revision: 43083
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43083
Author:   nicholasbishop
Date:     2012-01-02 19:01:16 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
Remove some silly variable copies that stuck around from a previous refactor.

Modified Paths:
--------------
    trunk/blender/source/blender/gpu/GPU_buffers.h
    trunk/blender/source/blender/gpu/intern/gpu_buffers.c

Modified: trunk/blender/source/blender/gpu/GPU_buffers.h
===================================================================
--- trunk/blender/source/blender/gpu/GPU_buffers.h	2012-01-02 17:15:24 UTC (rev 43082)
+++ trunk/blender/source/blender/gpu/GPU_buffers.h	2012-01-02 19:01:16 UTC (rev 43083)
@@ -167,7 +167,7 @@
 			int *vert_indices, int totvert);
 GPU_Buffers *GPU_build_grid_buffers(struct DMGridData **grids,
 	int *grid_indices, int totgrid, int gridsize);
-void GPU_update_grid_buffers(GPU_Buffers *buffers_v, struct DMGridData **grids,
+void GPU_update_grid_buffers(GPU_Buffers *buffers, struct DMGridData **grids,
 	int *grid_indices, int totgrid, int gridsize, int smooth);
 void GPU_draw_buffers(GPU_Buffers *buffers);
 void GPU_free_buffers(GPU_Buffers *buffers);

Modified: trunk/blender/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_buffers.c	2012-01-02 17:15:24 UTC (rev 43082)
+++ trunk/blender/source/blender/gpu/intern/gpu_buffers.c	2012-01-02 19:01:16 UTC (rev 43083)
@@ -1296,10 +1296,9 @@
 	unsigned int tot_tri, tot_quad;
 };
 
-void GPU_update_mesh_buffers(GPU_Buffers *buffers_v, MVert *mvert,
+void GPU_update_mesh_buffers(GPU_Buffers *buffers, MVert *mvert,
 			int *vert_indices, int totvert)
 {
-	GPU_Buffers *buffers = buffers_v;
 	VertexBufferFormat *vert_data;
 	int i;
 
@@ -1413,10 +1412,9 @@
 	return buffers;
 }
 
-void GPU_update_grid_buffers(GPU_Buffers *buffers_v, DMGridData **grids,
+void GPU_update_grid_buffers(GPU_Buffers *buffers, DMGridData **grids,
 	int *grid_indices, int totgrid, int gridsize, int smooth)
 {
-	GPU_Buffers *buffers = buffers_v;
 	DMGridData *vert_data;
 	int i, j, k, totvert;
 
@@ -1465,7 +1463,7 @@
 	buffers->totgrid = totgrid;
 	buffers->gridsize = gridsize;
 
-	//printf("node updated %p\n", buffers_v);
+	//printf("node updated %p\n", buffers);
 }
 
 GPU_Buffers *GPU_build_grid_buffers(DMGridData **UNUSED(grids), int *UNUSED(grid_indices),
@@ -1558,10 +1556,8 @@
 	return buffers;
 }
 
-void GPU_draw_buffers(GPU_Buffers *buffers_v)
+void GPU_draw_buffers(GPU_Buffers *buffers)
 {
-	GPU_Buffers *buffers = buffers_v;
-
 	if(buffers->vert_buf && buffers->index_buf) {
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glEnableClientState(GL_NORMAL_ARRAY);
@@ -1632,11 +1628,9 @@
 	}
 }
 
-void GPU_free_buffers(GPU_Buffers *buffers_v)
+void GPU_free_buffers(GPU_Buffers *buffers)
 {
-	if(buffers_v) {
-		GPU_Buffers *buffers = buffers_v;
-		
+	if(buffers) {
 		if(buffers->vert_buf)
 			glDeleteBuffersARB(1, &buffers->vert_buf);
 		if(buffers->index_buf)
@@ -1645,4 +1639,3 @@
 		MEM_freeN(buffers);
 	}
 }
-



More information about the Bf-blender-cvs mailing list