Code: Select all
InitSprite()
InitSprite3D()
InitKeyboard()
OpenScreen(640,480,32,"")
CreateSprite(0,128,128,#PB_Sprite_Texture)
StartDrawing(SpriteOutput(s0))
Box(0,50,128,20,$FFFFFF)
StopDrawing()
CreateSprite3D(0,0)
Procedure r()
ns.l=CreateSprite(#PB_Any,128,128)
RotateSprite3D(0,5-90,0)
UseBuffer(ns)
Start3D()
DisplaySprite3D(0,0,0,255)
Stop3D()
GrabSprite(0,0,0,128,128,#PB_Sprite_Texture)
UseBuffer(-1)
CreateSprite3D(0,0)
FreeSprite(ns)
EndProcedure
Repeat
ExamineKeyboard()
ClearScreen(0,0,0)
r()
Start3D()
DisplaySprite3D(0,333,333,255)
Stop3D()
FlipBuffers():Delay(16)
Until KeyboardPushed(#PB_Key_Escape) 



