forked from enlightenment/efl
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:
parent
a415fa9a7f
commit
330159d255
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue