@mothmanbr, I don't understand why you're not using SSwift's code from the link I gave :
<edit> updated for 1.24
SetGraphicsDriver GLMax2DDriver() Graphics 800,600 image:TImage=LoadImage("max.png") n:Float=0.4 SetBlend ALPHABLEND While Not KeyHit(key_escape) Cls SetAlpha 1.0 DrawImage image,100,100 SolidColorOn(0, 0, 255) SetAlpha n DrawImage image,100,100 SolidColorOff() n:+0.01 If n>1.0 n=0.1 Flip Wend ' ----------------------------------------------------------------------------------------------------------------------------------------------------------- ' This function enables solid color rendering. ' ' When rendering with solid colors, the color channels of the images you blit will be overridden with the solid color specified. The alpha channel will ' remain intact however. ' ' This allows you to render a solid color sprite, white for example, with alpha, over the original, to make it appear to glow. ' You can vary the strength of the effect by using SetAlpha() before you blit the second pass. ' ----------------------------------------------------------------------------------------------------------------------------------------------------------- Function SolidColorOn(R%=255, G%=255, B%=255) Local TexColorArray#[4] SetColor(R, G, B) ?Win32 If TD3D7Max2DDriver(_max2dDriver) ' If we are currently rendering with DirectX... d3d7graphicsdriver().direct3ddevice7().SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2) d3d7graphicsdriver().direct3ddevice7().SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE) Else ' We are using one of the OpenGL drivers. ? glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND) TexColorArray[0] = R TexColorArray[1] = G TexColorArray[2] = B glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, TexColorArray) ?Win32 EndIf ? End Function ' ----------------------------------------------------------------------------------------------------------------------------------------------------------- ' This function disables solid color rendering. ' ----------------------------------------------------------------------------------------------------------------------------------------------------------- Function SolidColorOff() Local TexColorArray#[4] SetColor(255, 255, 255) ?Win32 If TD3D7Max2DDriver(_max2dDriver) d3d7graphicsdriver().direct3ddevice7().SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE) d3d7graphicsdriver().direct3ddevice7().SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE) Else ? glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, TexColorArray) ?Win32 EndIf ? End Function
<edit> updated for 1.24