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



On Dec 15, 2004, at 12:24 PM, Rob Barris wrote:

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.

The alternating colors are static; it's just one color which alternates RGBA, RGB0. I'm currently using a color array to render the gradient curve-surface tri-strip (see the screenshots from the MacFOH website). The single-line curves use a 1D alpha texture for antialiasing, which is the same situation; alternating tex coords which are all a/b duplicates. This is what makes me want to use a vertex program if I can gain performance and/or free up some memory bandwidth, especially for Rage Pro users (BTW, are VP's native on that hardware?). My original implementation of the color array used 4ub, and suffered from an expensive conversion at each flush (no ATI_rev used), so I switched to 4f and lost that extra overhead at the expense of more memory. It just seems like there should be a better way to do this...
--
Shaun Wexler
MacFOH
http://www.macfoh.com


_______________________________________________
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
References: 
 >Re: Alternating vertex colors (From: Rob Barris <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.