mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add a comment
This commit is contained in:
parent
0519c69c13
commit
5826a958e1
3
image.go
3
image.go
@ -71,6 +71,9 @@ func (i *images) savePixels(context *opengl.Context) error {
|
||||
func (i *images) restorePixels(context *opengl.Context) error {
|
||||
i.m.Lock()
|
||||
defer i.m.Unlock()
|
||||
// Dispose all images first because framebuffer/texture numbers can be reused.
|
||||
// If framebuffers/textures are not disposed here, a newly created framebuffer/texture
|
||||
// number can be a same number as existing one.
|
||||
for img := range i.images {
|
||||
if img.screen {
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user