Package com.ardor3d.util.shader.uniformtypes

Examples of com.ardor3d.util.shader.uniformtypes.ShaderVariableFloatArray


     * @param size
     *            the number of components per entry (must be 1, 2, 3, or 4)
     */
    public void setUniform(final String name, final FloatBuffer value, final int size) {
        assert (size >= 1 && size <= 4) : "Size must be 1, 2, 3 or 4";
        final ShaderVariableFloatArray shaderUniform = getShaderUniform(name, ShaderVariableFloatArray.class);
        shaderUniform.value = value;
        shaderUniform.size = size;

        setNeedsRefresh(true);
    }
View Full Code Here


     *            uniform variable to change
     * @param value
     *            the new value
     */
    public void setUniform(final String name, final float[] value) {
        final ShaderVariableFloatArray shaderUniform = getShaderUniform(name, ShaderVariableFloatArray.class);
        shaderUniform.value = BufferUtils.createFloatBuffer(value);

        setNeedsRefresh(true);
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.util.shader.uniformtypes.ShaderVariableFloatArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.