cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=330159d2558b83f8018db09a37b530bac54711c9

commit 330159d2558b83f8018db09a37b530bac54711c9
Author: Bogdan Devichev <b.devic...@samsung.com>
Date:   Wed Apr 15 17:00:36 2015 +0200

    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 <ced...@osg.samsung.com>
---
 src/examples/evas/evas-3d-primitives.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/examples/evas/evas-3d-primitives.c 
b/src/examples/evas/evas-3d-primitives.c
index baee7a1..f737002 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)
    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;
        }
 }
 

-- 


Reply via email to