* 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
3.0
Sha..om 12 years ago
parent c972861331
commit 3195940994
  1. 2
      engine/src/core/com/jme3/shader/Uniform.java

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

Loading…
Cancel
Save