[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55527] trunk/blender/source/blender/gpu/ intern/gpu_material.c: OpenGL: Moving the GPU_pass_update_uniforms() call from GPU_material_bind_uniforms() to GPU_material_bind().
Mitchell Stokes
mogurijin at gmail.com
Sat Mar 23 04:11:50 CET 2013
Revision: 55527
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55527
Author: moguri
Date: 2013-03-23 03:11:48 +0000 (Sat, 23 Mar 2013)
Log Message:
-----------
OpenGL: Moving the GPU_pass_update_uniforms() call from GPU_material_bind_uniforms() to GPU_material_bind(). This way, material specific uniforms don't need to be resent when sending object specific uniforms. This saves uniform update calls in the BGE where one material is bound and multiple objects can be drawn. This doesn't offer much in the way of performance, but it cleans up our OpenGL usage a bit. One test scene went from 8k OpenGL calls to 4k with just this one change.
Modified Paths:
--------------
trunk/blender/source/blender/gpu/intern/gpu_material.c
Modified: trunk/blender/source/blender/gpu/intern/gpu_material.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_material.c 2013-03-23 03:04:02 UTC (rev 55526)
+++ trunk/blender/source/blender/gpu/intern/gpu_material.c 2013-03-23 03:11:48 UTC (rev 55527)
@@ -278,6 +278,7 @@
}
GPU_pass_bind(material->pass, time, mipmap);
+ GPU_pass_update_uniforms(material->pass);
material->bound = 1;
}
}
@@ -338,8 +339,6 @@
mult_m4_m4m4(lamp->dynpersmat, lamp->persmat, viewinv);
}
}
-
- GPU_pass_update_uniforms(material->pass);
}
}
More information about the Bf-blender-cvs
mailing list