| 106 | } |
| 107 | |
| 108 | void GL46TextureCubeArray::LoadTextureLevel(uint32_t item, uint32_t level, void const* data) |
| 109 | { |
| 110 | auto texture = GetTexture(); |
| 111 | if (texture && level < texture->GetNumLevels()) |
| 112 | { |
| 113 | auto const width = texture->GetDimensionFor(level, 0); |
| 114 | auto const height = texture->GetDimensionFor(level, 1); |
| 115 | |
| 116 | // Determine cube and face indexes from the item index. |
| 117 | auto const cube = texture->GetCubeIndexFor(item); |
| 118 | auto const face = texture->GetFaceIndexFor(item); |
| 119 | |
| 120 | // Each face in the TextureCubeArray has a unique GL target. |
| 121 | GLenum targetFace = msCubeFaceTarget[face]; |
| 122 | |
| 123 | // For TextureCubeArray, use the 3D calls where the cube index is the |
| 124 | // third dimension. Only updating one cube-face for the specified |
| 125 | // level. |
| 126 | glTexSubImage3D(targetFace, level, 0, 0, cube, width, height, 1, |
| 127 | mExternalFormat, mExternalType, data); |
| 128 | } |
| 129 | } |
| 130 | |
| 131 |
nothing calls this directly
no test coverage detected