| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
The default blend equation for both RGB and alpha is additive (GL_FUNC_ADD). So all you need to do is set up the blend functions. See http://opengl.org/sdk/docs/man/xhtml/glBlendEquation.xml and http://opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml for all the details. There are separate variants to both these calls in case you need different blending factors or equations for the color components and the alpha component. Also, from what you wrote, I understand you do not want the background to show at all during the transition. That is, you are drawing two textured quads and whatever is behind those two quads should not appear on screen. In that case, for the first quad the blend function should be glBlendFunc(GL_ONE, GL_ZERO); which will essentially ignore the source alpha (or you can set the front color to (r, g, b, 1) and draw the color values at full intensity. You may also simply turn off blending entirely. For the second quad, use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); which will result in linear interpolation of the color values between the first and the second quad as you interpolate the alpha component of the front color. On May 16, 2008, at 15:37, Richard Salvatierra wrote:
|
_______________________________________________ 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: | |
| >Draw multiple textures with additive alpha (From: Richard Salvatierra <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.