* Fixed issue 590 (Uniform.setVector4Length() re-allocating buffer even when not needed)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10544 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
Sha..om 2013-04-16 15:21:41 +00:00
parent c972861331
commit 3195940994

View File

@ -309,7 +309,7 @@ public class Uniform extends ShaderVariable {
return; return;
FloatBuffer fb = (FloatBuffer) value; FloatBuffer fb = (FloatBuffer) value;
if (fb == null || fb.capacity() < length) { if (fb == null || fb.capacity() < length * 4) {
value = BufferUtils.createFloatBuffer(length * 4); value = BufferUtils.createFloatBuffer(length * 4);
} }