Texture arrays not supporting compressed formats
Also fixed loading texture arrays with mipmaps
experimental
shadowislord 10 years ago
parent 9965d20c44
commit 18807cf175
  1. 16
      jme3-lwjgl/src/main/java/com/jme3/renderer/lwjgl/TextureUtil.java

@ -305,6 +305,18 @@ class TextureUtil {
mipDepth, mipDepth,
border, border,
data); data);
} else if (target == GL_TEXTURE_2D_ARRAY_EXT) {
// Upload compressed texture array slice
glCompressedTexSubImage3D(target,
i,
0,
0,
index,
mipWidth,
mipHeight,
1,
glFmt.internalFormat,
data);
}else{ }else{
//all other targets use 2D: array, cubemap, 2d //all other targets use 2D: array, cubemap, 2d
glCompressedTexImage2D(target, glCompressedTexImage2D(target,
@ -347,8 +359,8 @@ class TextureUtil {
0, // xoffset 0, // xoffset
0, // yoffset 0, // yoffset
index, // zoffset index, // zoffset
width, // width mipWidth, // width
height, // height mipHeight, // height
1, // depth 1, // depth
glFmt.format, glFmt.format,
glFmt.dataType, glFmt.dataType,

Loading…
Cancel
Save