发布日期: 04/13/2021

Alpha Blending

The BlendFunc command allows for alpha blending. To use it, send a BlendFunc message to a scene, for example:

scene << BlendFunc(SRC_ALPHA, ONE_MINUS_SRC_ALPHA)

SRC_ALPHA and ONE_MINUS_SRC_ALPHA are OpenGL constants that tell BlendFunc to use alpha to blend against the existing display buffer. Disabling z-buffer testing or rendering primitives from back to front might be needed for some applications. By default, the z-buffer tests prevent anything from drawing behind a transparent polygon after it is drawn.

More information about all the constants available to BlendFunc (many of which are not useful to the JSL programmer) are available in the OpenGL documentation at opengl.org.

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).