; TextureFilter Example ; --------------------- Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() light=CreateLight() RotateEntity light,45,45,0 ; Load the chrome texture normally - no filter is active yet plain_tex=LoadTexture("media/Chorme-2.BMP") ; Add a texture filter: from now on, any texture whose filename contains ; "Chorme" is loaded with flags 1+64 (color + spherical environment map) TextureFilter "Chorme",1+64 ; The same file again - this time the filter adds the sphere-map flag env_tex=LoadTexture("media/Chorme-2.BMP") ; Two spheres side by side to compare the two loads plain_ball=CreateSphere(24) PositionEntity plain_ball,-1.5,0,5 EntityTexture plain_ball,plain_tex env_ball=CreateSphere(24) PositionEntity env_ball,1.5,0,5 EntityTexture env_ball,env_tex While Not KeyDown(1) TurnEntity plain_ball,0,1,0 TurnEntity env_ball,0,1,0 ; Arrow keys move the camera If KeyDown(200) Then MoveEntity camera,0,0,0.1 If KeyDown(208) Then MoveEntity camera,0,0,-0.1 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 RenderWorld Text 0,0,"Arrows: camera Esc: exit" Text 0,20,"Left: loaded BEFORE the filter - plain texture" Text 0,40,"Right: loaded AFTER TextureFilter Chorme,1+64 - sphere-mapped chrome" Flip Wend End