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>
This commit is contained in:
Bogdan Devichev 2015-04-15 17:00:36 +02:00 committed by Cedric BAIL
parent a415fa9a7f
commit 330159d255
1 changed files with 6 additions and 6 deletions

View File

@ -246,13 +246,13 @@ _generate_grid_indices(unsigned short *indices, int count)
for (j = 0; j < count; j++)
for (i = 0; i < count; i++)
{
*index++ = (unsigned short)(i + vccount * j);
*index++ = i + vccount * (j + 1);
*index++ = i + 1 + vccount * (j + 1);
*index++ = (i * vccount) + j;
*index++ = (i * vccount) + j + 1;
*index++ = ((i + 1) * vccount) + j;
*index++ = i + vccount * j;
*index++ = i + 1 + vccount * j;
*index++ = i + vccount * (j + 1) + 1;
*index++ = ((i + 1) * vccount) + j;
*index++ = (i * vccount) + j + 1;
*index++ = ((i + 1) * vccount) + j + 1;
}
}