fix renderer crash due to merge

experimental^2^2
Kirill Vainer 9 years ago
parent 2e4148f3c3
commit 49a9a6f99b
  1. 14
      jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

@ -975,12 +975,12 @@ public final class GLRenderer implements Renderer {
gl.glUniform1i(loc, b.booleanValue() ? GL.GL_TRUE : GL.GL_FALSE); gl.glUniform1i(loc, b.booleanValue() ? GL.GL_TRUE : GL.GL_FALSE);
break; break;
case Matrix3: case Matrix3:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
assert fb.remaining() == 9; assert fb.remaining() == 9;
gl.glUniformMatrix3(loc, false, fb); gl.glUniformMatrix3(loc, false, fb);
break; break;
case Matrix4: case Matrix4:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
assert fb.remaining() == 16; assert fb.remaining() == 16;
gl.glUniformMatrix4(loc, false, fb); gl.glUniformMatrix4(loc, false, fb);
break; break;
@ -989,23 +989,23 @@ public final class GLRenderer implements Renderer {
gl.glUniform1(loc, ib); gl.glUniform1(loc, ib);
break; break;
case FloatArray: case FloatArray:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
gl.glUniform1(loc, fb); gl.glUniform1(loc, fb);
break; break;
case Vector2Array: case Vector2Array:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
gl.glUniform2(loc, fb); gl.glUniform2(loc, fb);
break; break;
case Vector3Array: case Vector3Array:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
gl.glUniform3(loc, fb); gl.glUniform3(loc, fb);
break; break;
case Vector4Array: case Vector4Array:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
gl.glUniform4(loc, fb); gl.glUniform4(loc, fb);
break; break;
case Matrix4Array: case Matrix4Array:
fb = (FloatBuffer) uniform.getValue(); fb = uniform.getMultiData();
gl.glUniformMatrix4(loc, false, fb); gl.glUniformMatrix4(loc, false, fb);
break; break;
case Int: case Int:

Loading…
Cancel
Save