How to draw a rotated UI image?

Started by tao, March 17, 2014, 03:30:40 AM

Previous topic - Next topic

tao

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!

EgonOlsen

Not with blit. You can use the Overlay class for this.

tao

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?

EgonOlsen

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.