* Allow loading non-square power-of-2 textures without resize
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8470 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
130283914e
commit
afbf8ad69d
@ -743,8 +743,7 @@ public class LwjglGL1Renderer implements GL1Renderer {
|
||||
if (!GLContext.getCapabilities().GL_ARB_texture_non_power_of_two) {
|
||||
if (img.getWidth() != 0 && img.getHeight() != 0) {
|
||||
if (!FastMath.isPowerOfTwo(img.getWidth())
|
||||
|| !FastMath.isPowerOfTwo(img.getHeight())
|
||||
|| img.getWidth() != img.getHeight()) {
|
||||
|| !FastMath.isPowerOfTwo(img.getHeight())) {
|
||||
|
||||
// Resize texture to Power-of-2 size
|
||||
MipMapGenerator.resizeToPowerOf2(img);
|
||||
|
@ -1871,8 +1871,7 @@ public class LwjglRenderer implements Renderer {
|
||||
|
||||
if (img.getWidth() != 0 && img.getHeight() != 0) {
|
||||
if (!FastMath.isPowerOfTwo(img.getWidth())
|
||||
|| !FastMath.isPowerOfTwo(img.getHeight())
|
||||
|| img.getWidth() != img.getHeight()) {
|
||||
|| !FastMath.isPowerOfTwo(img.getHeight())) {
|
||||
// logger.log(Level.WARNING, "Encountered NPOT texture {0}, "
|
||||
// + "it might not display correctly.", img);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user