toVideoMemory method
void
toVideoMemory()
Implementation
void toVideoMemory() {
final gl = Engine.instance.flutterGlPlugin.gl;
const alignment = 1;
gl.pixelStorei(gl.UNPACK_ALIGNMENT, alignment);
gl
..activeTexture(gl.TEXTURE0)
..bindTexture(gl.TEXTURE_2D, textureID)
..texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)
..texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE)
// Set texture filtering
..texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR)
..texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, len, hgt, 0, gl.RGBA,
gl.UNSIGNED_BYTE, data);
}