- egl::Image *surface = cubeTexture->getImage(face, surfaceLevel);
- device->setTextureLevel(sampler, face, mipmapLevel, surface, sw::TEXTURE_CUBE);
+ egl::Image *surface = texture->getImage(surfaceLevel);
+ device->setTextureLevel(sampler, 0, mipmapLevel, surface, sw::TEXTURE_2D_ARRAY);
+ }
+ }
+ break;
+ case GL_TEXTURE_CUBE_MAP:
+ {
+ TextureCubeMap *cubeTexture = static_cast<TextureCubeMap*>(baseTexture);
+
+ for(int mipmapLevel = 0; mipmapLevel < sw::MIPMAP_LEVELS; mipmapLevel++)
+ {
+ cubeTexture->updateBorders(mipmapLevel);
+
+ for(int face = 0; face < 6; face++)
+ {
+ int surfaceLevel = mipmapLevel + baseLevel;
+
+ if(surfaceLevel > maxLevel)
+ {
+ surfaceLevel = maxLevel;
+ }
+
+ egl::Image *surface = cubeTexture->getImage(face, surfaceLevel);
+ device->setTextureLevel(sampler, face, mipmapLevel, surface, sw::TEXTURE_CUBE);
+ }