[Bf-blender-cvs] [6bba006] master: Cleanup: Minor spelling fixes:
Antony Riakiotakis
noreply at git.blender.org
Sat Mar 29 10:56:41 CET 2014
Commit: 6bba006bf2bb7ef4b8758a215def13885fc2f9f7
Author: Antony Riakiotakis
Date: Sat Mar 29 11:56:32 2014 +0200
https://developer.blender.org/rB6bba006bf2bb7ef4b8758a215def13885fc2f9f7
Cleanup: Minor spelling fixes:
===================================================================
M source/blender/gpu/intern/gpu_buffers.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index ad7aeb2..d3353e6 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1702,8 +1702,8 @@ void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, CCGElem **grids,
}
if (!smooth) {
- /* for flat shading, recalc normals and set the first vertex of
- * each quad in the index buffer to have the flat normal as
+ /* for flat shading, recalc normals and set the last vertex of
+ * each triangle in the index buffer to have the flat normal as
* that is what opengl will use */
for (j = 0; j < key->grid_size - 1; j++) {
for (k = 0; k < key->grid_size - 1; k++) {
@@ -1793,7 +1793,7 @@ static int gpu_count_grid_quads(BLI_bitmap **grid_hidden,
* unsigned shorts or unsigned ints. */
#define FILL_QUAD_BUFFER(type_, tot_quad_, buffer_) \
{ \
- type_ *quad_data; \
+ type_ *tri_data; \
int offset = 0; \
int i, j, k; \
\
@@ -1801,10 +1801,10 @@ static int gpu_count_grid_quads(BLI_bitmap **grid_hidden,
sizeof(type_) * (tot_quad_) * 6, NULL, \
GL_STATIC_DRAW_ARB); \
\
- /* Fill the quad buffer */ \
- quad_data = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, \
+ /* Fill the buffer */ \
+ tri_data = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, \
GL_WRITE_ONLY_ARB); \
- if (quad_data) { \
+ if (tri_data) { \
for (i = 0; i < totgrid; ++i) { \
BLI_bitmap *gh = NULL; \
if (grid_hidden) \
@@ -1818,12 +1818,13 @@ static int gpu_count_grid_quads(BLI_bitmap **grid_hidden,
gridsize, k, j)) \
continue; \
\
- *(quad_data++) = offset + j * gridsize + k + 1; \
- *(quad_data++) = offset + j * gridsize + k; \
- *(quad_data++) = offset + (j + 1) * gridsize + k; \
- *(quad_data++) = offset + (j + 1) * gridsize + k + 1; \
- *(quad_data++) = offset + j * gridsize + k + 1; \
- *(quad_data++) = offset + (j + 1) * gridsize + k; \
+ *(tri_data++) = offset + j * gridsize + k + 1; \
+ *(tri_data++) = offset + j * gridsize + k; \
+ *(tri_data++) = offset + (j + 1) * gridsize + k; \
+ \
+ *(tri_data++) = offset + (j + 1) * gridsize + k + 1; \
+ *(tri_data++) = offset + j * gridsize + k + 1; \
+ *(tri_data++) = offset + (j + 1) * gridsize + k; \
} \
} \
\
More information about the Bf-blender-cvs
mailing list