Draw sprite on another sprite with UseBuffer() ?
Posted: Sun Jul 24, 2011 2:20 pm
I am using PB 4.6b3 and even with earlier versions i dont get it work on the x86 nor on x64 version. I want to draw a sprite on another sprite for a special realtime effect. I have tried Grabsprite as solution but its slow like hell when grabbing each frame a big area for a special realtime fx. How can i draw a sprite (2d/3d) on another? Something i tried, basic...
Sprite 10 is everytime empty... i can just only draw stuff on it with the 2d drawing commands and using SpriteOutput().... But drawing sprites on another does not work here for me, even with the latest PB version... Did i miss somehing or still doing something wrong? Thx
Code: Select all
LoadSprite(0,... )
CreateSprite(10,... ) ; Dimensions are a lot bigger as the loaded sprite
; Inside the mainloop
UseBuffer(10)
DisplaySprite(0,0,0)
UseBuffer(#PB_Default)
DisplaySprite(10,.. )