mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
graphics: Update comments about makeVolatile
This commit is contained in:
parent
83da4ea112
commit
ef31a6bb21
8
image.go
8
image.go
@ -733,10 +733,10 @@ func NewImage(width, height int, filter Filter) (*Image, error) {
|
|||||||
//
|
//
|
||||||
// This is suitable for offscreen images that pixels are changed often.
|
// This is suitable for offscreen images that pixels are changed often.
|
||||||
//
|
//
|
||||||
// Pixels in regular non-volatile images are saved at each end of a frame if the image
|
// Regular non-volatile images need to record drawing history or read its pixels from GPU if necessary so that all
|
||||||
// is changed, and restored automatically from the saved pixels on context lost.
|
// the images can be restored automatically from the context lost. However, such recording the drawing history or
|
||||||
// On the other hand, pixels in volatile images are not saved.
|
// reading pixels from GPU are expensive operations. Volatile images can skip such oprations, but the image content
|
||||||
// Saving pixels is an expensive operation, and it is desirable to avoid it if possible.
|
// is cleared every frame instead.
|
||||||
//
|
//
|
||||||
// When the image is disposed, makeVolatile does nothing.
|
// When the image is disposed, makeVolatile does nothing.
|
||||||
func (i *Image) makeVolatile() {
|
func (i *Image) makeVolatile() {
|
||||||
|
Loading…
Reference in New Issue
Block a user