com.io7m.r2.core.shaders.types

## Class R2ShaderPreprocessingEnvironment

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

- All Implemented Interfaces:
    R2ShaderPreprocessingEnvironmentReadableType, R2ShaderPreprocessingEnvironmentType

      public final class R2ShaderPreprocessingEnvironment
      extends Object
      implements R2ShaderPreprocessingEnvironmentType

  The default implementation of the `R2ShaderPreprocessingEnvironmentType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static R2ShaderPreprocessingEnvironmentType` | `create(com.io7m.sombrero.core.SoShaderPreprocessorType in_preproc)` Create a new environment.
    `com.io7m.sombrero.core.SoShaderPreprocessorType` | `preprocessor()`
    `Map<String,String>` | `preprocessorDefines()`
    `void` | `preprocessorDefinesClear()` Clear all preprocessor defines.
    `void` | `preprocessorDefineSet(String name, String value)` Set the value of a preprocessor define.
    `void` | `preprocessorDefineUnset(String name)` Unset a preprocessor define.

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

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

- - ### Method Detail

    - #### create

          public static R2ShaderPreprocessingEnvironmentType create(com.io7m.sombrero.core.SoShaderPreprocessorType in_preproc)

      Create a new environment.
      Parameters:
        `in_preproc` - The preprocessor
      Returns:
        A new empty environment

    - #### preprocessorDefineSet

          public void preprocessorDefineSet(String name,
                                            String value)

      Description copied from interface: `R2ShaderPreprocessingEnvironmentType`
      Set the value of a preprocessor define.
      Specified by:
        `preprocessorDefineSet` in interface `R2ShaderPreprocessingEnvironmentType`
      Parameters:
        `name` - The name
        `value` - The value

    - #### preprocessorDefineUnset

          public void preprocessorDefineUnset(String name)

      Description copied from interface: `R2ShaderPreprocessingEnvironmentType`
      Unset a preprocessor define.
      Specified by:
        `preprocessorDefineUnset` in interface `R2ShaderPreprocessingEnvironmentType`
      Parameters:
        `name` - The name

    - #### preprocessorDefinesClear

          public void preprocessorDefinesClear()

      Description copied from interface: `R2ShaderPreprocessingEnvironmentType`
      Clear all preprocessor defines.
      Specified by:
        `preprocessorDefinesClear` in interface `R2ShaderPreprocessingEnvironmentType`

    - #### preprocessorDefines

          public Map<String,String> preprocessorDefines()

      Specified by:
        `preprocessorDefines` in interface `R2ShaderPreprocessingEnvironmentReadableType`
      Returns:
        A read-only view of the current preprocessor defines

    - #### preprocessor

          public com.io7m.sombrero.core.SoShaderPreprocessorType preprocessor()

      Specified by:
        `preprocessor` in interface `R2ShaderPreprocessingEnvironmentReadableType`
      Returns:
        A shader preprocessor

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