Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-01-2010, 10:31 AM   #5 (permalink)
warmi
Registered Member
 
Join Date: Nov 2008
Posts: 234
Default

Quote:
Originally Posted by headkaze View Post
Actually that's an interesting point, is it that important to have the array interleaved? Currently for my model animation system I am setting the vertex pointer for each anim frame rather than copying over the data which is obviously quicker. This means my vertex, tex coords etc. are all separate pointers to the data. But I did stumble upon an article which said to keep your vertex data in a single struct for better performance. I take it that's what you mean by interleaved? But with the iPhone sharing it's RAM and not having to transfer data to any sort of "VRAM" would it really incur a penalty?

EDIT: Found the article Interleaving Vertex Data which is where this is stated. Also for the OP who may want to look at transforming vertex data using matrices, another good article from the same site Transformations and Matricies
It all about spatial locality - if you are accessing positions , there is a good chance you will also access normals ( if you are doing CPU transformations) and having normals reside in some other part of memory means having potential two cache line misses as opposed to just one.
Beside your own code , the GLES driver on the iPhone walks your entire vertex stream and does some preprocessing on its own so you do want to use interleaved arrays.

PS. I am not sure I understand your point about animations and having separate vertex streams.
warmi is offline   Reply With Quote
 

» Advertisements
» Online Users: 271
19 members and 252 guests
ADY, apatsufas, ckgni, F_Bryant, IphoneSdk, jakerocheleau, karunaskj, MarkC, michelle, NSeven, peterkessler45, rob.mccarthy, rodrigozanatta, smethorst, themathminister, TheWebWizz, V_SC&, Xaron, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,225
Posts: 380,711
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:22 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.