func (t *TextureArray2D) GenerateMipmap() {
	C.TextureGenerateMipmap(t.object)
}
GenerateMipmap generates mipmaps for the texture.
package gl
import (
	"image"
)
import "C"
type TextureArray2D struct {
	object C.GLuint
	format TextureFormat
}
func NewTextureArray2D(levels int32, f TextureFormat, width, height int32, count int32) TextureArray2D {
	var t TextureArray2D
	t.format = f
	t.object = C.NewTextureArray2D(C.GLsizei(levels), C.GLenum(f), C.GLsizei(width), C.GLsizei(height), C.GLsizei(count))
	return t
}
func (t *TextureArray2D) SubImage(level int32, ox, oy int32, index int32, img image.Image) {
	p, pf, pt := pointerFormatAndTypeOf(img)
	C.TextureArray2DSubImage(
		t.object,
		C.GLint(level),
		C.GLint(ox), C.GLint(oy), C.GLint(index),
		C.GLsizei(img.Bounds().Dx()), C.GLsizei(img.Bounds().Dy()), C.GLsizei(1),
		pf, pt, p,
	)
}