summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBogdan Devichev <b.devichev@samsung.com>2015-04-15 17:00:36 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-07 09:53:08 +0200
commit330159d2558b83f8018db09a37b530bac54711c9 (patch)
tree51ed64a81a73b17d1078b5abb74a3b2a8144495a /src
parenta415fa9a7f11db0aa5716772e2a2015d987590e4 (diff)
evas: fix indexation of grid (it neccessary for future tangent calculation) in Evas 3D examples
Summary: New indexation for more easy calculation of tangents. Reviewers: Hermet, raster, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2332 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/examples/evas/evas-3d-primitives.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/examples/evas/evas-3d-primitives.c b/src/examples/evas/evas-3d-primitives.c
index baee7a1a4a..f7370024b0 100644
--- a/src/examples/evas/evas-3d-primitives.c
+++ b/src/examples/evas/evas-3d-primitives.c
@@ -246,13 +246,13 @@ _generate_grid_indices(unsigned short *indices, int count)
246 for (j = 0; j < count; j++) 246 for (j = 0; j < count; j++)
247 for (i = 0; i < count; i++) 247 for (i = 0; i < count; i++)
248 { 248 {
249 *index++ = (unsigned short)(i + vccount * j); 249 *index++ = (i * vccount) + j;
250 *index++ = i + vccount * (j + 1); 250 *index++ = (i * vccount) + j + 1;
251 *index++ = i + 1 + vccount * (j + 1); 251 *index++ = ((i + 1) * vccount) + j;
252 252
253 *index++ = i + vccount * j; 253 *index++ = ((i + 1) * vccount) + j;
254 *index++ = i + 1 + vccount * j; 254 *index++ = (i * vccount) + j + 1;
255 *index++ = i + vccount * (j + 1) + 1; 255 *index++ = ((i + 1) * vccount) + j + 1;
256 } 256 }
257} 257}
258 258