Renamed variables, index is the singular of indices
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 7dd1985..d2d94f2 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -551,8 +551,8 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou
const int num_vertices = 4 * count;
const int num_indices = 6 * count;
const int size_indices = 4;
- int cur_indice = 0;
- const int *rect_indice_list = renderer->rect_indice_list;
+ int cur_index = 0;
+ const int *rect_index_order = renderer->rect_index_order;
for (i = 0; i < count; ++i) {
float minx, miny, maxx, maxy;
@@ -571,13 +571,13 @@ QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int cou
*ptr_xy++ = minx;
*ptr_xy++ = maxy;
- *ptr_indices++ = cur_indice + rect_indice_list[0];
- *ptr_indices++ = cur_indice + rect_indice_list[1];
- *ptr_indices++ = cur_indice + rect_indice_list[2];
- *ptr_indices++ = cur_indice + rect_indice_list[3];
- *ptr_indices++ = cur_indice + rect_indice_list[4];
- *ptr_indices++ = cur_indice + rect_indice_list[5];
- cur_indice += 4;
+ *ptr_indices++ = cur_index + rect_index_order[0];
+ *ptr_indices++ = cur_index + rect_index_order[1];
+ *ptr_indices++ = cur_index + rect_index_order[2];
+ *ptr_indices++ = cur_index + rect_index_order[3];
+ *ptr_indices++ = cur_index + rect_index_order[4];
+ *ptr_indices++ = cur_index + rect_index_order[5];
+ cur_index += 4;
}
retval = renderer->QueueGeometry(renderer, cmd, NULL,
@@ -1064,13 +1064,13 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
renderer->dpi_scale.y = 1.0f;
/* Default value, if not specified by the renderer back-end */
- if (renderer->rect_indice_list[0] == 0 && renderer->rect_indice_list[1] == 0) {
- renderer->rect_indice_list[0] = 0;
- renderer->rect_indice_list[1] = 1;
- renderer->rect_indice_list[2] = 2;
- renderer->rect_indice_list[3] = 0;
- renderer->rect_indice_list[4] = 2;
- renderer->rect_indice_list[5] = 3;
+ if (renderer->rect_index_order[0] == 0 && renderer->rect_index_order[1] == 0) {
+ renderer->rect_index_order[0] = 0;
+ renderer->rect_index_order[1] = 1;
+ renderer->rect_index_order[2] = 2;
+ renderer->rect_index_order[3] = 0;
+ renderer->rect_index_order[4] = 2;
+ renderer->rect_index_order[5] = 3;
}
/* new textures start at zero, so we start at 1 so first render doesn't flush by accident. */
@@ -3125,7 +3125,7 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer,
int num_vertices = 4 * count;
int num_indices = 0;
const int size_indices = 4;
- int cur_indice = -4;
+ int cur_index = -4;
const int is_looping = (points[0].x == points[count - 1].x && points[0].y == points[count - 1].y);
SDL_FPoint p; /* previous point */
p.x = p.y = 0.0f;
@@ -3152,9 +3152,9 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer,
*ptr_xy++ = q.y + scale_y;
#define ADD_TRIANGLE(i1, i2, i3) \
- *ptr_indices++ = cur_indice + i1; \
- *ptr_indices++ = cur_indice + i2; \
- *ptr_indices++ = cur_indice + i3; \
+ *ptr_indices++ = cur_index + i1; \
+ *ptr_indices++ = cur_index + i2; \
+ *ptr_indices++ = cur_index + i3; \
num_indices += 3; \
/* closed polyline, donĀ“t draw twice the point */
@@ -3166,7 +3166,7 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer,
/* first point only, no segment */
if (i == 0) {
p = q;
- cur_indice += 4;
+ cur_index += 4;
continue;
}
@@ -3216,7 +3216,7 @@ SDL_RenderDrawLinesF(SDL_Renderer * renderer,
}
p = q;
- cur_indice += 4;
+ cur_index += 4;
}
retval = QueueCmdGeometry(renderer, NULL,
@@ -3534,7 +3534,7 @@ SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture,
float uv[8];
const int uv_stride = 2 * sizeof (float);
const int num_vertices = 4;
- const int *indices = renderer->rect_indice_list;
+ const int *indices = renderer->rect_index_order;
const int num_indices = 6;
const int size_indices = 4;
float minu, minv, maxu, maxv;
@@ -3682,7 +3682,7 @@ SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture,
float uv[8];
const int uv_stride = 2 * sizeof (float);
const int num_vertices = 4;
- const int *indices = renderer->rect_indice_list;
+ const int *indices = renderer->rect_index_order;
const int num_indices = 6;
const int size_indices = 4;
float minu, minv, maxu, maxv;
diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h
index fb411f4..dc8be46 100644
--- a/src/render/SDL_sysrender.h
+++ b/src/render/SDL_sysrender.h
@@ -249,7 +249,7 @@ struct SDL_Renderer
SDL_RenderLineMethod line_method;
/* List of triangle indices to draw rects */
- int rect_indice_list[6];
+ int rect_index_order[6];
/* Remainder from scaled relative motion */
float xrel;
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 96a3766..4f6f1e5 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -1932,12 +1932,12 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->info.texture_formats[renderer->info.num_texture_formats++] = SDL_PIXELFORMAT_UYVY;
#endif
- renderer->rect_indice_list[0] = 0;
- renderer->rect_indice_list[1] = 1;
- renderer->rect_indice_list[2] = 3;
- renderer->rect_indice_list[3] = 1;
- renderer->rect_indice_list[4] = 3;
- renderer->rect_indice_list[5] = 2;
+ renderer->rect_index_order[0] = 0;
+ renderer->rect_index_order[1] = 1;
+ renderer->rect_index_order[2] = 3;
+ renderer->rect_index_order[3] = 1;
+ renderer->rect_index_order[4] = 3;
+ renderer->rect_index_order[5] = 2;
if (SDL_GL_ExtensionSupported("GL_EXT_framebuffer_object")) {
data->GL_EXT_framebuffer_object_supported = SDL_TRUE;
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 4112c1a..41bf300 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -2232,12 +2232,12 @@ GLES2_CreateRenderer(SDL_Window *window, Uint32 flags)
}
#endif
- renderer->rect_indice_list[0] = 0;
- renderer->rect_indice_list[1] = 1;
- renderer->rect_indice_list[2] = 3;
- renderer->rect_indice_list[3] = 1;
- renderer->rect_indice_list[4] = 3;
- renderer->rect_indice_list[5] = 2;
+ renderer->rect_index_order[0] = 0;
+ renderer->rect_index_order[1] = 1;
+ renderer->rect_index_order[2] = 3;
+ renderer->rect_index_order[3] = 1;
+ renderer->rect_index_order[4] = 3;
+ renderer->rect_index_order[5] = 2;
/* Set up parameters for rendering */
data->glActiveTexture(GL_TEXTURE0);