]> git.tdb.fi Git - libs/gl.git/commit
Better handling of unloaded textures
authorMikko Rasa <tdb@tdb.fi>
Mon, 29 Sep 2014 21:07:20 +0000 (00:07 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 29 Sep 2014 21:07:20 +0000 (00:07 +0300)
commit946266e823c07025f115b5e4f5523b496dcb393e
tree658385ad66cb394c7b450d20435628d2173c3733
parent24a5a7e6dced2dbb44be06ca821e9600306b0bfd
Better handling of unloaded textures

Since it's no longer guaranteed that calling ResourceManager::resource_used
will result in Resource::load being called, it's better to avoid the
binding logic entirely in the unloaded case.  In particular, parameters
must not be updated until the GL texture object has been created.

Generating an ID for the texture has been delayed to the last phase of
loading to further differentiate the loaded and unloaded states.
source/texture.cpp
source/texture2d.cpp