Syntax

dbSetObjectTransparency(ObjectID, Flag)

Description

This command will set the transparency state of the specified object. The transparent colour is determined by the dbSetImageColorKey command or the alpha channel of the texture. The transparency modes are used to control when and how the object is drawn into the scene, and are described below. Special consideration should be used with the depth sort system, which takes the coordinate of the object and camera and depth sorts based on the distance between these points. You can inadvertantly create a situation where a large object behind a small object would have a shorter distance, and be rendered last instead of first.

The 'Flag' parameter can be one of the following values

#GDK_Basic3D_DrawFirstNoAlpha    : Draw first with no alpha blending 
#GDK_Basic3D_DrawFirstWithAlpha  : Draw first with alpha blending
#GDK_Basic3D_DrawSecond          : Draw second with alpha blending
#GDK_Basic3D_DrawSecondLowRes    : Draw second with low-res alpha blending
#GDK_Basic3D_DrawSecondClip      : Draw second and clip for alpha values beyond 0x000000CF
#GDK_Basic3D_WaterLineObject     : Automatically separate for depth sort.
#GDK_Basic3D_DrawSecondLowResClip: Draw second with alpha and clip (useful for falling LOD leaves)

See Also

dbGhostObjectOn, dbGhostObjectOff, dbHideObject, dbSetAlphaMappingOn, dbSetImageColorKey, dbSetObjectMask, dbShowObject