Optimize VAO/VBO usage for minimal state changes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Feb 2016 01:12:14 +0000 (02:12 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Feb 2016 01:40:06 +0000 (02:40 +0100)
commit2fd06b9c44225d1e740cb2de08a9dfa5c9cd0031
treed9e84bbc164a3835b139afb23f7c87c3ad487d37
parent54d47f65e9abac77229636fbaaefea8caf34a4d4
Optimize VAO/VBO usage for minimal state changes.

This is similar to what we had earlier to just reuse the VAO,
but now with correct bindings no matter what vertex attributes
are assigned to what index, so that the (new) test passes.

This is actually slightly more efficient than what we had before,
since we don't look up the attributes by text anymore, and don't
reupload the VBO for each frame anymore. In practice, the effects
should be small.
effect_chain.cpp
effect_chain.h
util.cpp
util.h