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:
authorAntony Riakiotakis <kalast@gmail.com>2014-03-29 13:56:32 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-03-29 13:56:32 +0400
commit6bba006bf2bb7ef4b8758a215def13885fc2f9f7 (patch)
tree0f03d9f54f350c56d2bf4749770e98e7869d68bd /source/blender
parent6a1b7facf97e8196f0c3e38cf2261e48d99d84c5 (diff)
Cleanup: Minor spelling fixes:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index ad7aeb2aa89..d3353e68d0b 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; \
} \
} \
\