LoadTexture ( file$[,flags] )
Parameters:
| file$ - filename of image file to be used as texture flags (optional) - texture flag: 1: Color 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map |
Description:
| Load a texture from an image file and returns the texture's handle. The optional flags parameter allows you to apply certain effects to the texture. Flags can be added to combine two or more effects, e.g. 3 (1+2) = texture with colour and alpha maps. Here
are quick descriptions of the flags: See also: CreateTexture, LoadAnimTexture. |
| ; LoadTexture Example ; ------------------- Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() light=CreateLight() RotateEntity light,90,0,0 cube=CreateCube() PositionEntity cube,0,0,5 ; Load texture tex=LoadTexture("../media/b3dlogo.jpg") ; Texture cube with texture EntityTexture cube,tex While Not KeyDown( 1 ) pitch#=0 yaw#=0 roll#=0 If KeyDown( 208 )=True Then pitch#=-1 If KeyDown( 200 )=True Then pitch#=1 If KeyDown( 203 )=True Then yaw#=-1 If KeyDown( 205 )=True Then yaw#=1 If KeyDown( 45 )=True Then roll#=-1 If KeyDown( 44 )=True Then roll#=1 TurnEntity cube,pitch#,yaw#,roll# RenderWorld Flip Wend End |