2D Toolkit Forum

2D Toolkit => Support => Topic started by: gonzalez.martin90 on January 08, 2015, 03:37:53 pm

Title: Painting with Tk2d Atlas
Post by: gonzalez.martin90 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!
Title: Re: Painting with Tk2d Atlas
Post by: unikronsoftware 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