what is the optim开发者_StackOverflow社区al texture size in this case for pixel perfect fit on screen and for performance? Target: background texture for a device with 480x800 resolution
a. 480x800 image resized to: 512x1024
b. 512x1024 texture contains a 480x800 region and u = 0.0 .. 0.9375 (480/512) v = 0.0 .. 0.78125 (800/1024)
c. original image (480x800) as texture
Option c. should be avoided as many devices are only power-of-two compatible. b. should be faster than a. since not as many texels have to be fetched from the texture memory. I doubt however that you will notice any difference in fps as at 480x800 you're most likely to be fillrate-limited more than anything else.
And yes, you can get pixel-perfect mapping using b. if you set your texcoords correctly, I'm using a texture atlas giving p-p results for my app.
精彩评论