code: func NewTexture(width, height int, smooth bool, pixels []uint8) *Texture {
  	tex := &Texture{
  		tex: binder{
  			restoreLoc: gl.TEXTURE_BINDING_2D,
  			bindFunc: func(obj uint32) {
  				gl.BindTexture(gl.TEXTURE_2D, obj)
  			},
  		},
  		width:  width,
  		height: height,
  	}
  
  	gl.GenTextures(1, &tex.tex.obj)
  
  	tex.Begin()
  	defer tex.End()
  
  	// initial data
  	gl.TexImage2D(
  		gl.TEXTURE_2D,
  		0,
  		gl.RGBA,
  		int32(width),
  		int32(height),
  		0,
  		gl.RGBA,
  		gl.UNSIGNED_BYTE,
  		gl.Ptr(pixels),
  	)
  
  	borderColor := mgl32.Vec4{0, 0, 0, 0}
  	gl.TexParameterfv(gl.TEXTURE_2D, gl.TEXTURE_BORDER_COLOR, &borderColor[0])
  	gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_BORDER)
  	gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_BORDER)
  
  	tex.SetSmooth(smooth)
  
  	runtime.SetFinalizer(tex, (*Texture).delete)
  
  	return tex
  }
docs: // NewTexture creates a new texture with the specified width and height with some initial
  // pixel values. The pixels must be a sequence of RGBA values (one byte per component).