I was going to enter a new topic but saw this one on the same issue I am having.
E/AndroidRuntime( 2692): FATAL EXCEPTION: GLThread 9
E/AndroidRuntime( 2692): java.lang.OutOfMemoryError
E/AndroidRuntime( 2692): at com.threed.jpct.Texture.loadTexture(Texture.java:742)
E/AndroidRuntime( 2692): at com.threed.jpct.Texture.<init>(Texture.java:192)
E/AndroidRuntime( 2692): at com.threed.jpct.molespect.MoleSpect.loadTextures(MoleSpect.java:1364)
E/AndroidRuntime( 2692): at com.threed.jpct.molespect.MoleSpect.Text2PosTexture(MoleSpect.java:2022)
E/AndroidRuntime( 2692): at com.threed.jpct.molespect.MoleSpect.TextFormatTexture(MoleSpect.java:1819)
E/AndroidRuntime( 2692): at com.threed.jpct.molespect.MoleSpect.showElementpage(MoleSpect.java:1673)
E/AndroidRuntime( 2692): at com.threed.jpct.molespect.MoleSpect$MyRenderer.onDrawFrame(MoleSpect.java:2364)
E/AndroidRuntime( 2692): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
E/AndroidRuntime( 2692): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
I tried the preWarm() option but when I compile it says:
cannot find symbol
[javac] symbol : method preWarm(com.threed.jpct.FrameBuffer)
[javac] location: class com.threed.jpct.TextureManager
[javac] TextureManager.getInstance().preWarm(fb);
While I use "fb" as a global for blitting my text which works fine. It is created like this
in my global section.
private FrameBuffer fb = null;
I use "fb" in multiple functions and works in the rest of the program.
Also, on the memory issue I run a memory checker and i tried:
replacing the texture --- memory usage still grows with each use.
unload and remove the texture then load news ones back in -- memory usage still grows with each use.
flush and reload all textures then add my new texture - memory still grows with each use.
Comment out the replacement of the new texture -- works fine memory stays in green, over and over just fine. Just does not add my modification texture.
No success with any of these options will keep trying to figure out why preWarm() is not working.