Hello Guest

Author Topic: Painting with Tk2d Atlas  (Read 3307 times)

gonzalez.martin90

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 24
    • View Profile
Painting with Tk2d Atlas
« on: January 08, 2015, 03:37:53 pm »
We are doing a game that we have to paint a black and white image. We are using SetPixel and GetPixel but we have troubles with uV coordinates.
 Anybody has an example of how we can paint in the tk2d collection atlas?

Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Painting with Tk2d Atlas
« Reply #1 on: January 09, 2015, 06:04:08 pm »
You shouldn't be painting into the atlas or otherwise manipulate large textures like that - they will be duplicated in memory and can end up costing a lot of ram, but you can if you really want to. Also, if you were painting into something like that you probably don't need to use an atlas for that - its a very roundabout way of doing something for no real gain, just use a quad with a texture / render texture on it and draw into that - the uvs on that should be 0,0..1,1