Multitexturing (Image Included)

BlitzMax Forums/BlitzMax Programming/Multitexturing (Image Included)

DX nor the OGL version will be very readable.

If you missed it.
Function Splat(r_image1:TImage , r_image2:TImage)
  Local frame1:TD3D7ImageFrame=TD3D7ImageFrame(r_image1.frame(0))
  Local frame2:TD3D7ImageFrame=TD3D7ImageFrame(r_image2.frame(0))
	
	D3D7GraphicsDriver().Direct3DDevice7().SetTexture 0,frame1.surface
	gDriver.device.SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
	gDriver.device.SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG1 );
	gDriver.device.SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_DISABLE );
	
	D3D7GraphicsDriver().Direct3DDevice7().SetTexture 1,frame2.surface
	gDriver.device.SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
	gDriver.device.SetTextureStageState( 1, D3DTSS_COLOROP,   D3DTOP_MODULATE );
	gDriver.device.SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT );
	gDriver.device.SetTextureStageState( 1, D3DTSS_ALPHAOP,   D3DTOP_DISABLE );
	
End Function