Fix T44077 material update fails in textured mode when VBOs are off.

The issue has been here since we changed drawing code for meshes to use
vertex arrays instead of immediate mode when VBO was off. Basically we
should now always invalidate the GPU objects regardless of the VBO
setting in the preferences.

The bug has been there since 2.73 at least, but what made it apparent
now is that new version resets preferences and as an extension the VBO
flag.

Should be included in final 2.74 release
This commit is contained in:
Antonis Ryakiotakis 2015-03-31 11:42:39 +02:00 committed by Sergey Sharybin
parent a555fa5b28
commit 4f57f15648
Notes: blender-bot 2023-02-14 09:21:21 +01:00
Referenced by issue #44077, BI: material failed to update in Texture shading mode
1 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ static void material_changed(Main *bmain, Material *ma)
}
/* find textured objects */
if (texture_draw && !(U.gameflags & USER_DISABLE_VBO)) {
if (texture_draw) {
for (ob = bmain->object.first; ob; ob = ob->id.next) {
DerivedMesh *dm = ob->derivedFinal;
Material ***material = give_matarar(ob);
@ -423,7 +423,7 @@ static void texture_changed(Main *bmain, Tex *tex)
}
/* find textured objects */
if (texture_draw && !(U.gameflags & USER_DISABLE_VBO)) {
if (texture_draw) {
for (ob = bmain->object.first; ob; ob = ob->id.next) {
DerivedMesh *dm = ob->derivedFinal;
Material ***material = give_matarar(ob);