www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: tao on March 17, 2014, 03:30:40 am

Title: How to draw a rotated UI image?
Post by: tao on March 17, 2014, 03:30:40 am
Hi,

In my game all UI images are drawn using FrameBuffer.blit() method. Can I add rotation to these images? From the api docs i don't find blit() has such feature... Or, any idea how to draw a rotated UI images?

Many thanks!
Title: Re: How to draw a rotated UI image?
Post by: EgonOlsen on March 17, 2014, 07:10:41 am
Not with blit. You can use the Overlay class for this.
Title: Re: How to draw a rotated UI image?
Post by: tao on March 17, 2014, 01:55:53 pm
Thanks, I'll give a try.

Btw, what's the implementation difference between Overlay and blit()? Do both create a plane facing to camera? Also, If I have the same number of Overlays and blit calls which one is more heavy?
Title: Re: How to draw a rotated UI image?
Post by: EgonOlsen on March 17, 2014, 03:05:01 pm
Overlay is heavier, because it creates real Object3D instances. blit() is simpler but more limited. If blit is sufficient, use blit and use Overlay only if you have to.