mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphicscommand: Improve debug messages
This change also enables to dump volatile images.
This commit is contained in:
parent
2d079b123f
commit
0cf11d9af8
@ -319,7 +319,16 @@ func (c *drawTrianglesCommand) String() string {
|
||||
panic(fmt.Sprintf("graphicscommand: invalid address: %d", c.address))
|
||||
}
|
||||
|
||||
return fmt.Sprintf("draw-triangles: dst: %d <- src: %d, colorm: %v, mode %s, filter: %s, address: %s", c.dst.id, c.src.id, c.color, mode, filter, address)
|
||||
dst := fmt.Sprintf("%d", c.dst.id)
|
||||
if c.dst.screen {
|
||||
dst += " (screen)"
|
||||
}
|
||||
src := fmt.Sprintf("%d", c.src.id)
|
||||
if c.src.screen {
|
||||
src += " (screen)"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("draw-triangles: dst: %s <- src: %s, colorm: %v, mode %s, filter: %s, address: %s", dst, src, c.color, mode, filter, address)
|
||||
}
|
||||
|
||||
// Exec executes the drawTrianglesCommand.
|
||||
|
@ -95,9 +95,6 @@ func RestoreIfNeeded() error {
|
||||
// This is for testing usage.
|
||||
func DumpImages(dir string) error {
|
||||
for img := range theImages.images {
|
||||
if img.volatile {
|
||||
continue
|
||||
}
|
||||
if img.screen {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user