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: Transparent objects



You can also use an additive blending function, e.g., glBlendFunc( 
GL_SRC_ALPHA, GL_ONE ), which doesn't require that your primitives be sorted 
(though gives a somewhat different effect).

Also, you'll sometimes want depth testing enabled when drawing a set of
transparent objects so that they can be obscured by solid / opaque objects.  By 
setting glDepthMask( GL_FALSE ) you can disable writes to the depth buffer, 
meaning you still won't have to draw the transparent objects in sorted order.

---- Original message ----
>
>On Dec 24, 2004, at 7:41 AM, Lorenzo wrote:
>
>> Describing what I see is really complicated and boring, so I simply 
>> ask:
>> In my animation, how can I draw the 2 transparent objects such a way I 
>> see
>> what a human eye really sees?
>
>Disable depth testing and always draw translucent objects from back to 
>front.
>Blending does not play nicely with depth testing.
>
>Chaz McGarvey
>http://www.brokenzipper.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



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.