| texture - указатель текстуры |
|
Удаляет текстуру из памяти.
После удаления текстуры Вы уже не сможете пользоваться ею. Однако, объекты, уже текстурированные ею, не потеряют свою текстуру. |
|
; Пример FreeTexture
; ------------------- Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() light=CreateLight() RotateEntity light,90,0,0 cube=CreateCube() PositionEntity cube,0,0,5 ; Загружаем текстуру tex=LoadTexture( "media/b3dlogo.jpg" ) ; Текстурируем куб EntityTexture cube,tex While Not KeyDown( 1 ) ; Пробелом удаляем текстуру из памяти If KeyHit( 57 )=True Then FreeTexture tex 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 Text 0,0,"Press spacebar to free texture" Text 0,20,"As you can see this will not affect already textured entities" Flip Wend End |