|
|
@ -31,13 +31,6 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package com.jme3; |
|
|
|
package com.jme3; |
|
|
|
|
|
|
|
|
|
|
|
import com.jme3.material.Material; |
|
|
|
|
|
|
|
import com.jme3.math.ColorRGBA; |
|
|
|
|
|
|
|
import com.jme3.shader.BufferObject; |
|
|
|
|
|
|
|
import com.jme3.shader.BufferObject.Layout; |
|
|
|
|
|
|
|
import com.jme3.shader.BufferObjectField; |
|
|
|
|
|
|
|
import com.jme3.shader.UniformBufferObject; |
|
|
|
|
|
|
|
import com.jme3.shader.VarType; |
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -48,20 +41,6 @@ public class SetupTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test(expected=AssertionError.class) |
|
|
|
@Test(expected=AssertionError.class) |
|
|
|
public void testAssertionEnabled() { |
|
|
|
public void testAssertionEnabled() { |
|
|
|
|
|
|
|
|
|
|
|
Material material; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final UniformBufferObject ubo = new UniformBufferObject(3, Layout.std140, |
|
|
|
|
|
|
|
new BufferObjectField("light_1", VarType.Vector4), |
|
|
|
|
|
|
|
new BufferObjectField("light_2", VarType.Vector4), |
|
|
|
|
|
|
|
new BufferObjectField("array", VarType.FloatArray) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
ubo.setValue("light_1", ColorRGBA.Black); |
|
|
|
|
|
|
|
ubo.setValue("light_2", ColorRGBA.Gray); |
|
|
|
|
|
|
|
ubo.setValue("array", new float[] {1F, 2F, 3F}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
material.setBufferObject("uboTest", ubo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert false; |
|
|
|
assert false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|