Trying to emulate exactly what the tests are doing, but it won't use my textures.
ProceduralTextureGenerator pt = new ProceduralTextureGenerator(heightMap);
pt.addTexture(new ImageIcon(BZ2.class.getClassLoader().getResource("dune1.bmp")), -128, 0, 128);
Results in:
java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
at java.awt.image.BufferedImage.<init>(BufferedImage.java:312)
at com.jmex.terrain.util.ProceduralTextureGenerator.addTexture(ProceduralTextureGenerator.java:222)
at com.games4j.bz2.BZ2.simpleInitGame(BZ2.java:131)
at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:503)
at com.jme.app.BaseGame.start(BaseGame.java:69)
at com.games4j.bz2.BZ2.main(BZ2.java:54)
I've tried multiple textures, bmp, tga, jpg, and not just the same image.
Any ideas? God I feel like this is something really stupid.