mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 23:14:28 +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 {
|
func (i *images) restorePixels(context *opengl.Context) error {
|
||||||
i.m.Lock()
|
i.m.Lock()
|
||||||
defer i.m.Unlock()
|
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 {
|
for img := range i.images {
|
||||||
if img.screen {
|
if img.screen {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user