java - Texture.setEnforcePotImages(false); cannot resolve mothed error under android studio -


i using libgdx tutorial first time under android studio. ide android studio , have setup initial gradle under android studio , tested on emulator.

the tutorial says use texture.setenforcepotimages(false); since using 800x480 pixels canvas. however, error "cannot resolve method" , there no intellisense setenforcepotimages when click texture.

why says that. have libraries included per tutorial.

hope can help.

thanks hwq

that method has been removed. texture.setenforcepotimages(false) method disable libgdx's protection against issues image files did not have size of power of 2 (1, 2, 4, 8, 16, 32, 64, 128, 256 , on). protection enabled because (older) devices don't support image files don't have size of power of 2 (pot). case opengl es version 1.x. opengl es version 2.x , above restriction (and libgdx's protection) doesn't apply. of version 1.0 of libgdx support opengl es v1.x (including method) has been removed.

you can use image files don't have size of power of two. note functionality (like texture wrapping) might still require power of 2 sized image files.

also have @ https://github.com/libgdx/libgdx/wiki/texture-packer. you'd typically pack multiple images single larger file. while images aren't pot sized, (and should) still pack them pot sized texture.


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -