Author Topic: Blitting with rotation  (Read 972 times)

Offline Lobby

  • int
  • **
  • Posts: 66
    • View Profile
    • flowersoft
Blitting with rotation
« on: February 09, 2014, 07:28:41 pm »
Hello, would it be possible to add rotation support to blitting on a FrameBuffer? I think using Overlay isn't appreciated if you have a lot of dynamicially things to draw, is it?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Blitting with rotation
« Reply #1 on: February 09, 2014, 07:37:08 pm »
That's actually what Overlay is for. Why do think that it's a problem with dynamic things and how much is 'a lot' in this context?

Offline Lobby

  • int
  • **
  • Posts: 66
    • View Profile
    • flowersoft
Re: Blitting with rotation
« Reply #2 on: February 09, 2014, 10:03:44 pm »
For a 2D particle engine for example, would you suggest to hold all particle images as overlays? Also when it means that you have to create and remove ten overlays a second? Yes, one could use something like a Overlay-Pool, but this sounds like a lot of work...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Blitting with rotation
« Reply #3 on: February 09, 2014, 10:13:55 pm »
I'm not sure how you want to do a particle system with blitting anyway. I would rather use Object3D's for that (or do in a shader for really heavy particle systems).

Offline Lobby

  • int
  • **
  • Posts: 66
    • View Profile
    • flowersoft
Re: Blitting with rotation
« Reply #4 on: February 09, 2014, 10:18:09 pm »
In 2D it's neat to have calls like DrawImage(Image, x, y, Rotation) instead of handling collections of objects. It can make things easier :D .

But I understand your point, so also for 2D 3D objects would be the best solution in regard of performance.