; LoadTexture Example ; ------------------- Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() light=CreateLight() RotateEntity light,45,45,0 ; A crate for our game scene crate=CreateCube() PositionEntity crate,0,0,5 ; Load an image file as a texture (optional flags argument omitted) tex=LoadTexture("media/b3dlogo.jpg") ; Apply the loaded texture to the crate EntityTexture crate,tex While Not KeyDown(1) TurnEntity crate,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,"The crate is textured with media/b3dlogo.jpg" Flip Wend End