# SetObjectAlphaMask

## Description

Sets alpha masking on or off for this object. This is similar to transparency but only produces fully transparent or fully opaque pixels, there are no blended or semi-transparent pixels. If a pixel has an alpha value less than 128 it will be ignored, if it is greater than or equal to 128 then it will be drawn. This has less problems with depth ordering than when using SetObjectTransparency but may be slightly slower in some cases. You should not use both transparency and alpha masking on the same object at the same time, only use one or the other.

## Definition

SetObjectAlphaMask( objID, mode )

void agk::SetObjectAlphaMask( UINT objID, int mode )

## Parameters

- objID - The ID of the object to modify.
- mode - 1=use alpha masking, 0=turn off alpha masking.