Texture arrays not supporting compressed formats
Also fixed loading texture arrays with mipmaps
This commit is contained in:
shadowislord 2014-11-18 21:13:50 -05:00
parent 9965d20c44
commit 18807cf175

View File

@ -305,6 +305,18 @@ class TextureUtil {
mipDepth,
border,
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{
//all other targets use 2D: array, cubemap, 2d
glCompressedTexImage2D(target,
@ -347,8 +359,8 @@ class TextureUtil {
0, // xoffset
0, // yoffset
index, // zoffset
width, // width
height, // height
mipWidth, // width
mipHeight, // height
1, // depth
glFmt.format,
glFmt.dataType,