Live manipulation of textures?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Live manipulation of textures?

Post by darkhog »

How can I manipulate Bitmaps (created with BitmapExpression, nothing more) in runtime, so I can achieve "animation" effect e.g. by changing some variable in Timer and then basing bitmap of sinus of said variable?
Is that even possible?
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi darkhog,

Yes this is possible, and actually very easy :) Simply use a RefreshContent component in a OnUpdate event and set the component property to your Bitmap. Keep in mind that this can be quite CPU-intensive though ( depending on the Bitmap resolution and expression ).

K
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

Post by darkhog »

Thanks!
Post Reply