theapache64
04/10/2021, 11:32 AMIntOffset
or IntSize
(object creation) to outside the DrawScope
? I mean, will there any notable performance difference if I move these measurement classes outside the DrawScope
drawImage(
image = R.graphics.brickPng,
dstOffset = IntOffset(floorBrick.x, floorBrick.y), // or should I call `floorBrick.intOffset?` (where intOffset created only one time)
)
Igor Demin
04/10/2021, 11:44 AMtheapache64
04/10/2021, 11:44 AMorangy
04/10/2021, 11:46 AMIntOffset
& IntSize
are inline classes, so no object is created at all. It’s just Long value all the waytheapache64
04/10/2021, 11:47 AMorangy
04/10/2021, 11:47 AMtheapache64
04/10/2021, 11:49 AMorangy
04/10/2021, 11:51 AMfloorBrick.image
instead of single brickPng
consider using image slices instead of different images. Using same texture repeatedly is much more efficient on GPU, so use image packing systems for this.theapache64
04/10/2021, 11:53 AMNader Jawad
04/13/2021, 8:41 PM