return texObj;
}
+
+/**
+ * For clearing cube textures, the zoffset and depth parameters indicate
+ * which cube map faces are to be cleared. This is the one case where we
+ * need to be concerned with multiple gl_texture_images. This function
+ * returns the array of texture images to clear for cube maps, or one
+ * texture image otherwise.
+ * \return number of texture images, 0 for error, 6 for cube, 1 otherwise.
+ */
static int
get_tex_images_for_clear(struct gl_context *ctx,
const char *function,
minDepth = -(int) texImages[0]->Border;
maxDepth = texImages[0]->Depth;
} else {
+ assert(numImages == MAX_FACES);
minDepth = 0;
maxDepth = numImages;
}
data ? clearValue[0] : NULL);
}
} else {
+ /* loop over cube face images */
for (i = zoffset; i < zoffset + depth; i++) {
+ assert(i < MAX_FACES);
if (!check_clear_tex_image(ctx, "glClearTexSubImage",
texImages[i],
format, type, data, clearValue[i]))