com.io7m.jcanephora.core.api

## Interface JCGLShaderUniformsType

- All Known Subinterfaces:
    JCGLShadersType

      public interface JCGLShaderUniformsType

  The interface to setting uniforms in shaders.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `shaderUniformPutFloat(JCGLProgramUniformType u, float value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutInteger(JCGLProgramUniformType u, int value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutMatrix3x3f(JCGLProgramUniformType u, com.io7m.jtensors.MatrixDirectReadable3x3FType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutMatrix4x4f(JCGLProgramUniformType u, com.io7m.jtensors.MatrixDirectReadable4x4FType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutTexture2DUnit(JCGLProgramUniformType u, JCGLTextureUnitType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutTextureCubeUnit(JCGLProgramUniformType u, JCGLTextureUnitType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutUnsignedInteger(JCGLProgramUniformType u, int value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector2f(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable2FType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector2i(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable2IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector2ui(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable2IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector3f(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable3FType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector3i(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable3IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector3ui(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable3IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector4f(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable4FType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector4i(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable4IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVector4ui(JCGLProgramUniformType u, com.io7m.jtensors.VectorReadable4IType value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformPutVectorf(JCGLProgramUniformType u, FloatBuffer value)` Upload the value `value` to the uniform `u`.
    `void` | `shaderUniformSetActivityCheckingEnabled(boolean enabled)` Enable or disable checking that a program is active when attempting to assign values to uniforms.
    `void` | `shaderUniformSetTypeCheckingEnabled(boolean enabled)` Enable or disable checking of the types of assigned uniforms.

- - ### Method Detail

    - #### shaderUniformSetTypeCheckingEnabled

          void shaderUniformSetTypeCheckingEnabled(boolean enabled)

      Enable or disable checking of the types of assigned uniforms. Type checking is enabled by default.
      Parameters:
        `enabled` - `true` iff type checking should be performed.

    - #### shaderUniformSetActivityCheckingEnabled

          void shaderUniformSetActivityCheckingEnabled(boolean enabled)

      Enable or disable checking that a program is active when attempting to assign values to uniforms. Activity checking is enabled by default.
      Parameters:
        `enabled` - `true` iff activity checking should be performed.

    - #### shaderUniformPutFloat

          void shaderUniformPutFloat(JCGLProgramUniformType u,
                                     float value)
                              throws JCGLException,
                                     JCGLExceptionProgramNotActive,
                                     JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutInteger

          void shaderUniformPutInteger(JCGLProgramUniformType u,
                                       int value)
                                throws JCGLException,
                                       JCGLExceptionProgramNotActive,
                                       JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutUnsignedInteger

          void shaderUniformPutUnsignedInteger(JCGLProgramUniformType u,
                                               int value)
                                        throws JCGLException,
                                               JCGLExceptionProgramNotActive,
                                               JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVectorf

          void shaderUniformPutVectorf(JCGLProgramUniformType u,
                                       FloatBuffer value)
                                throws JCGLException,
                                       JCGLExceptionProgramNotActive,
                                       JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`. This method is provided to allow for the use of array-typed uniforms in GLSL programs, where the type of the array elements are scalar floating point values, or vector floating point values.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector2f

          void shaderUniformPutVector2f(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable2FType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector3f

          void shaderUniformPutVector3f(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable3FType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector4f

          void shaderUniformPutVector4f(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable4FType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector2i

          void shaderUniformPutVector2i(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable2IType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector3i

          void shaderUniformPutVector3i(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable3IType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector4i

          void shaderUniformPutVector4i(JCGLProgramUniformType u,
                                        com.io7m.jtensors.VectorReadable4IType value)
                                 throws JCGLException,
                                        JCGLExceptionProgramNotActive,
                                        JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector2ui

          void shaderUniformPutVector2ui(JCGLProgramUniformType u,
                                         com.io7m.jtensors.VectorReadable2IType value)
                                  throws JCGLException,
                                         JCGLExceptionProgramNotActive,
                                         JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector3ui

          void shaderUniformPutVector3ui(JCGLProgramUniformType u,
                                         com.io7m.jtensors.VectorReadable3IType value)
                                  throws JCGLException,
                                         JCGLExceptionProgramNotActive,
                                         JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutVector4ui

          void shaderUniformPutVector4ui(JCGLProgramUniformType u,
                                         com.io7m.jtensors.VectorReadable4IType value)
                                  throws JCGLException,
                                         JCGLExceptionProgramNotActive,
                                         JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutMatrix3x3f

          void shaderUniformPutMatrix3x3f(JCGLProgramUniformType u,
                                          com.io7m.jtensors.MatrixDirectReadable3x3FType value)
                                   throws JCGLException,
                                          JCGLExceptionProgramNotActive,
                                          JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutMatrix4x4f

          void shaderUniformPutMatrix4x4f(JCGLProgramUniformType u,
                                          com.io7m.jtensors.MatrixDirectReadable4x4FType value)
                                   throws JCGLException,
                                          JCGLExceptionProgramNotActive,
                                          JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutTexture2DUnit

          void shaderUniformPutTexture2DUnit(JCGLProgramUniformType u,
                                             JCGLTextureUnitType value)
                                      throws JCGLException,
                                             JCGLExceptionProgramNotActive,
                                             JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

    - #### shaderUniformPutTextureCubeUnit

          void shaderUniformPutTextureCubeUnit(JCGLProgramUniformType u,
                                               JCGLTextureUnitType value)
                                        throws JCGLException,
                                               JCGLExceptionProgramNotActive,
                                               JCGLExceptionProgramTypeError

      Upload the value `value` to the uniform `u`.
      Parameters:
        `u` - The u variable.
        `value` - The value.
      Throws:
        `JCGLException` - Iff an OpenGL error occurs.
        `JCGLExceptionProgramNotActive` - Iff the program to which the uniform belongs is not active, and program activity checking is enabled
        `JCGLExceptionProgramTypeError` - Iff the program uniform is of the wrong type, and type checking is enabled
      See Also:
        `shaderUniformSetTypeCheckingEnabled(boolean)`, `shaderUniformSetActivityCheckingEnabled(boolean)`

Copyright © 2016 <code@io7m.com> http://io7m.com