Page 1 of 1

Draw sprite on another sprite with UseBuffer() ?

Posted: Sun Jul 24, 2011 2:20 pm
by va!n
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...

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,.. )
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

Re: Draw sprite on another sprite with UseBuffer() ?

Posted: Sun Jul 24, 2011 2:45 pm
by STARGĂ…TE
UseBuffer() works only with DirectX7 not with DirectX9

So use subsystem: DirectX7

Re: Draw sprite on another sprite with UseBuffer() ?

Posted: Sun Jul 24, 2011 9:55 pm
by va!n
Init DX7 fails on my modern PC with WIn7!
Btw, DX7 in 2011? I cant believe

Re: Draw sprite on another sprite with UseBuffer() ?

Posted: Sun Jul 24, 2011 10:18 pm
by J. Baker
va!n wrote:Btw, DX7 in 2011? I cant believe
DirectX 7 still rules! I still run it on my old pc. I love when games look like games and not so realistic. Maybe I'm old school but that's the way I like it. ;)

Yeah DX7 will not work on Win7. Come back to XP. ;)