func (t *PixelGrid) WriteToFile(path string) { util.WritePng(t.Image(), path) }
func (this *Window) SaveScreenshot(name string) { gl.ReadBuffer(gl.FRONT) gl.ReadPixels(0, 0, this.width, this.height, gl.RGBA, this.pixelData) var im = util.PixelDataToImage(this.pixelData, this.width, this.height) util.WritePng(im, "res/screenshots/"+name) }