Author Topic: How to draw a rotated UI image?  (Read 600 times)

Offline tao

  • byte
  • *
  • Posts: 16
    • View Profile
How to draw a rotated UI image?
« 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!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: How to draw a rotated UI image?
« Reply #1 on: March 17, 2014, 07:10:41 am »
Not with blit. You can use the Overlay class for this.

Offline tao

  • byte
  • *
  • Posts: 16
    • View Profile
Re: How to draw a rotated UI image?
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: How to draw a rotated UI image?
« Reply #3 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.