; HWMultiTex Example ; ------------------ Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,0,-4 light=CreateLight() RotateEntity light,30,-30,0 ; A crate with TWO texture layers - the logo multiplied over the mossy ground. ; Multitexturing is exactly what HWMultiTex controls. crate=CreateCube() tex1=LoadTexture("media/MossyGround.BMP") tex2=LoadTexture("media/b3dlogo.jpg") EntityTexture crate,tex1,0,0 EntityTexture crate,tex2,0,1 enable=1 While Not KeyDown(1) ; Space toggles the hardware multitexturing path If KeyHit(57) Then enable=1-enable ; True uses the graphics card's multitexture support; False falls back to ; Blitz3D's software technique. The crate should look the same either way - ; the switch exists for cards whose hardware multitexturing misbehaves. HWMultiTex enable TurnEntity crate,0.3,0.7,0.2 RenderWorld Text 0,0,"Space: toggle hardware multitexturing Esc: exit" If enable Then Text 0,20,"HWMultiTex True" Else Text 0,20,"HWMultiTex False" Flip Wend End