Display many brushes at the same time?

Discuss any general programming issues here
Post Reply
User avatar
Tarzin
Posts: 112
Joined: Mon Feb 15, 2010 11:46 am
Location: Dunkerque / FRANCE
Contact:

Display many brushes at the same time?

Post by Tarzin »

Helo!

I use command displaybrushFX like this
DisplayBrushFX (51,39,91, {Type = #FADE, Speed = 50})
DisplayBrushFX (52,207,91, {Type = #FADE, Speed = 50})
DisplayBrushFX (53,207,270, {Type = #FADE, Speed = 50})
DisplayBrushFX (54,33,270, {Type = #FADE, Speed = 50})

but it displays each brush when previous brush has been displayed. So brush 52 is displayed when 51 has been displyed and so on...
How to display brushes 51 to 54 at the same time? (each brush is different from others)

Thanks for advance!
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: Display many brushes at the same time?

Post by PEB »

Try this:

Async1=DisplayBrushFX (51,39,91, {Type = #FADE, Speed = 50, Async = True})
Async2=DisplayBrushFX (52,207,91, {Type = #FADE, Speed = 50, Async = True})
Async3=DisplayBrushFX (53,207,270, {Type = #FADE, Speed = 50, Async = True})
Async4=DisplayBrushFX (54,33,270, {Type = #FADE, Speed = 50, Async = True})
FrameNum=GetAttribute(#ASYNCDRAW, Async1, #ATTRNUMFRAMES)
For x=1 To FrameNum
AsyncDrawFrame(Async1)
AsyncDrawFrame(Async2)
AsyncDrawFrame(Async3)
AsyncDrawFrame(Async4)
Wait(50, #MILLISECONDS)
Next
FinishAsyncDraw(Async1)
FinishAsyncDraw(Async2)
FinishAsyncDraw(Async3)
FinishAsyncDraw(Async4)
User avatar
Tarzin
Posts: 112
Joined: Mon Feb 15, 2010 11:46 am
Location: Dunkerque / FRANCE
Contact:

Re: Display many brushes at the same time?

Post by Tarzin »

Working fine!
Thanks a lot PEB! :D

I'll try to get more infos about AsyncDrawFrame, seems to be interesting and powerfull!
A500 / A600 / A1200 / SAM440
WinUAE OS3.9 (AmiKit) / OS4.1FE (FlowerPot)
---
https://twitter.com/TarzinCDK
Post Reply