smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
729 stars 73 forks source link

Might be nice to parallelize PNG image loading #331

Open smcameron opened 1 year ago

smcameron commented 1 year ago

This would require separating the PNG loading/decoding step from the opengl texture binding stuff, since the opengl stuff can only be called from the main thread, and thus is serialized. I believe most of the time loading images is actually spent in PNG decoding, so separating this into a first step in which all the PNG coding is done (in parallel) and a 2nd step where these loaded PNG images are made known to opengl (serially) should in theory result in significantly faster load times.