示例#1
0
func (t *PixelGrid) WriteToFile(path string) {
	util.WritePng(t.Image(), path)
}
示例#2
0
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)
}