Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternating vertex colors




I'd like to find a more efficient way to specify two alternating vertex
colors for vertex arrays, rather than including a complete color4 array
in the VAO/VAR, ie "even color, odd color, even color, odd color..."
What other options do I have?  A vertex program?  I can't fall back to
a software renderer, and color arrays seem to incur too much overhead,
even though they're only generated when the colors change (my VAR
arrays are planar, non-interleaved, so I only have to flush the
dynamically-changing vertices).

Could you use an array of fixed texture coordinates alternating between two corners of a two color texture, and then just rewrite the texture when you want the colors to change? Do the colors need to change intra-frame or between frames ? Or you could have pre-made textures with the colors you want in the right corners, and just change texture binding to make the effective color change.


Rob

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.