Alpha mixing theory see previous blog: http://blog.csdn.net/dizuo/archive/2009/12/18/5035371.aspx
Alpha Fusion must set different Z values for the object. You can specify different Z values through glvertex3 * painting, or call gltranslate3f/d to set different Z values through glvertex2 * painting.
OpenGL draws two-dimensional images. When Alpha Fusion is performed, if all two-dimensional images have the same zvalue = 0.0f, even if correct Alpha Fusion settings are performed, each image is only merged with the window background, the fusion between images is not integrated.
Figure 1: alpha = 0.4f of the slice, alpha = 0.2f of the rectangle, and zvalue = 0.0f of the two. We can see that they both have a correct Alpha Fusion with the background gray, but they are not.
Figure 2: alpha = 0.4f, zvalue = 0.0f, alpha = 0.2f, and zvalue = 0.1f. At this time, the fusion is correct!
It is actually a bunch of nonsense, but it is because of a Z value that causes Alpha mixing failure. This problem has plagued me for a long time ~
-Ryf 2011/4/16
When drawingSort by Z value from small to largeIn order to correctly combine them !!
-Ryf 2012/3/3
Thank you.Gamemagic's advice,Draw 2DDisable the deep test and set the Alpha ValueTo achieve the expected results. orIn deep test mode, all elements must be sorted by depth value and drawn from the back to the front,, This approach is mainly for 3D space...