Hi Rene,
you were close
There are two alpha related operations in TBGL - alpha testing and alpha blending.
Alpha testing does what you experienced. It tests the alpha of incoming fragment (pixel) and based on its value it makes it solid or invisible. Nothing in between.
Alpha blending on the other side allows to use the full scale of transparency, and does what you need - based on alpha value, it blends the incoming fragment color with existing, creating the nice illusion of transparency.
To enable alpha blending, you need to enable blending as a such, and setup the blending function accordingly. Here little sample:
TBGL_UseBlend TRUE
TBGL_BlendFunc %GL_SRC_ALPHA, %GL_ONE_MINUS_SRC_ALPHA
' -- Render the transparent stuff here
Or, maybe better you could use the state preserving approach to avoid state leaks:
TBGL_PushBlendFunc %GL_SRC_ALPHA, %GL_ONE_MINUS_SRC_ALPHA
TBGL_PushState %TBGL_BLEND
' -- Render the transparent stuff here
TBGL_PopState
TBGL_PopBlendFunc
Petr
Bookmarks