Merge: gamnit: fix integer overflow when there's more than 16,383 sprites
authorJean Privat <jean@pryen.org>
Wed, 28 Jun 2017 19:39:25 +0000 (15:39 -0400)
committerJean Privat <jean@pryen.org>
Wed, 28 Jun 2017 19:39:25 +0000 (15:39 -0400)
This PR fixes a problem when more than 16,383 sprites used the same texture, thus shared a buffer. This was caused by a `short int` overflow in the vertices indices passed to OpenGL ES. Now, large groups of sprites are simply broken up into smaller groups and buffers.

In the future, if there are too many such groups we could use a larger integer.

Pull-Request: #2519

1  2 
lib/gamnit/flat.nit

Simple merge