Array Textures

I am getting an OpenGLException when trying to use a 2D array texture (Type.TwoDimensionalArray):



Exception in thread "LWJGL Renderer Thread" org.lwjgl.opengl.OpenGLException: Cannot use offsets when Pixel Unpack Buffer Object is disabled

at org.lwjgl.opengl.GLChecks.ensureUnpackPBOenabled(GLChecks.java:150)

at org.lwjgl.opengl.GL12.glTexImage3D(GL12.java:156)

at com.jme3.renderer.lwjgl.TextureUtil.uploadTexture(TextureUtil.java:364)

at com.jme3.renderer.lwjgl.LwjglRenderer.updateTextureData(LwjglRenderer.java:1376)

at com.jme3.renderer.lwjgl.LwjglRenderer.setTexture(LwjglRenderer.java:1392)

at com.jme3.material.Material.render(Material.java:511)

at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:302)

at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:100)

at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:147)

at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:138)

at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:414)

at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:546)

at com.jme3.renderer.RenderManager.render(RenderManager.java:560)





Does any one have a clue why? Or array texture is not yet supported in jme3?

Array textures are not supported yet by jME3.

Why do you need array textures?

I tried to use Array Textures while implementing a Clipmapped terrain lod system, storing heightmap textures in an array. I resorted to use an 2048x2048 texture in the end. I guess I could do incremental updates to heightmap textures instead of updating the whole when player hits a boundary…



The next thing is terrain texturing, I still think array textures might be useful, or I would have to do multipass to render many layers of texture.

Sounds good. You can still update only a portion of a texture (using a special OpenGL call, not exposed by jME3 yet). Consider that array textures require OpenGL3 and higher to run, while jME3 minimum requirement is OpenGL2.