}
if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
- /* Make sure that all six cube map level 0 images are the same size.
+ /* Make sure that all six cube map level 0 images are the same size and
+ * format.
* Note: we know that the image's width==height (we enforce that
* at glTexImage time) so we only need to test the width here.
*/
incomplete(t, BASE, "Cube face missing or mismatched size");
return;
}
+ if (t->Image[face][baseLevel]->InternalFormat !=
+ baseImage->InternalFormat) {
+ incomplete(t, BASE, "Cube face format mismatch");
+ return;
+ }
+ if (t->Image[face][baseLevel]->Border != baseImage->Border) {
+ incomplete(t, BASE, "Cube face border size mismatch");
+ return;
+ }
}
}