ebiten/internal/shareable
seebs 74e204d952 graphics: Speed up DrawTriangles (#723)
DrawTriangles is expensive and slow because of massive memory
allocation and garbage collection costs. This patch moves from ~47TPS
on my laptop (with ~24k triangles) to 60TPS. The first part
is just allocating the right size of vertex buffer up front; that
got to about 55TPS. The second part replaces the frequent
allocations of []float32 in Vertex() calls with writing the
desired values into a provided destination slice.

Time spent in drawing triangles for 1,000 frames:
	13.07s	baseline
	11.09s	preallocate whole buffer to avoid resizing
	6.13s	use new PutVertex function

This might need some cleanup, but I think it's good evidence that
the design change is viable.
2018-10-31 10:53:17 +09:00
..
shareable_test.go Merge graphics and graphicsutil 2018-10-28 23:03:06 +09:00
shareable.go graphics: Speed up DrawTriangles (#723) 2018-10-31 10:53:17 +09:00
size_macos.go shareable: Don't extend textures on macOS 2018-06-20 11:57:39 +09:00
size_notmacos.go shareable: Don't extend textures on macOS 2018-06-20 11:57:39 +09:00