com.io7m.r2.core.shaders.types

## Class R2ShaderParameters

- java.lang.Object
- - com.io7m.r2.core.shaders.types.R2ShaderParameters

-     public final class R2ShaderParameters
      extends Object

  Convenient functions for dealing with shader parameters.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `checkUniformParameterCount(com.io7m.jcanephora.core.JCGLProgramShaderUsableType p, int count)` Check that the given program has the expected number of uniform parameters.
    `static com.io7m.jcanephora.core.JCGLProgramUniformType` | `getUniformChecked(com.io7m.jcanephora.core.JCGLProgramShaderUsableType p, String name, com.io7m.jcanephora.core.JCGLType type)` Retrieve a uniform parameter for the given program, raising an exception if the parameter is not present for any reason.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getUniformChecked

          public static com.io7m.jcanephora.core.JCGLProgramUniformType getUniformChecked(com.io7m.jcanephora.core.JCGLProgramShaderUsableType p,
                                                                                          String name,
                                                                                          com.io7m.jcanephora.core.JCGLType type)
                                                                                   throws R2ExceptionShaderParameterNotPresent

      Retrieve a uniform parameter for the given program, raising an exception if the parameter is not present for any reason.
      Parameters:
        `p` - The program
        `name` - The parameter name
        `type` - The expected type of the parameter
      Returns:
        The parameter, if it exists
      Throws:
        `R2ExceptionShaderParameterNotPresent` - Iff the shader parameter was either undeclared or was optimized out

    - #### checkUniformParameterCount

          public static void checkUniformParameterCount(com.io7m.jcanephora.core.JCGLProgramShaderUsableType p,
                                                        int count)
                                                 throws R2ExceptionShaderParameterCountMismatch

      Check that the given program has the expected number of uniform parameters.
      Parameters:
        `p` - The program
        `count` - The expected number of parameters
      Throws:
        `R2ExceptionShaderParameterCountMismatch` - On unexpected parameter counts

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