Author Topic: Sub image of the big image  (Read 1358 times)

dipu5683

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Sub image of the big image
« on: May 02, 2014, 08:30:16 AM »
Hi

I am thinking to reduce the atlas creation & handling part. What i am thinking i will have a big 1024*1024 image png file with alpha transperancy, containing the small image placed one after another with one pixel padding. We will have the x,y,width,height of perticular image. At runtime, i will specify the sprite name , and UV position (x,y,wd,ht).

How can i do this?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Sub image of the big image
« Reply #1 on: May 02, 2014, 08:57:08 AM »
Isn't that exactly what the UIAtlas does? In your case, you just have to set the specifics at run time instead of compile time, and therefore have to reference all of those wherever you use them?

You can just use quads and have them draw portions of your big texture, I guess, but it's basically reinventing the sprite system in a more complicated way.