iphone - Is glDrawArray preferred way for dynamic vertices? -
i using gldrawelements render mesh (terrain) may have occasional udpates (terrain morphing). wondering if should technically go gldrawarrays instead?
really depends on whenever primitives use different vertices or not. in terrain example, if layout grid, each row of primitives share vertices previous row. if call gldrawarrays
instead of gldrawelements
need pass down repeated vertices, , costly (more vertices transform).
updating vertices has nothing on how render it, keep list of elements static in gpu memory, , update vertices (unless morphing requires update elements too, in case don't make them static).
that being said try both , see faster (profile!).
Comments
Post a Comment