binji / love-nacl

Port of LÖVE to Native Client
http://binji.github.io/love-nacl/
Other
43 stars 6 forks source link

performance issues on sinescroller & othro robot #15

Closed binji closed 11 years ago

binji commented 11 years ago

Seems to be font rendering; very curious bug:

Using glDrawElements with VBO for the indices creates some performance problems; switching to glDrawArrays with 6 verts per quad increases performance to 60fps on both examples.

sinescroller calls Font::print (which calls glDrawElements) once per character. Taking a look at chrome://tracing shows that Chrome was flushing the gpu command buffer once per character! I should follow up with the Chrome GPU team to see what I was doing wrong (or if it is a bug)

binji commented 11 years ago

Fixed in a9ed42fed47f4a2963784d1901a8e67c565254cb Leaving open to remind me to check about potential Chrome bug

binji commented 11 years ago

Sounds like it was hitting a pathological case, perhaps the index buffer was being revalidated every upload because the vertexes are not in a VBO?

In any case, closing.