com.io7m.jcanephora.fake

## Class FakeProgramUniform

- java.lang.Object
- - com.io7m.jcanephora.fake.FakeProgramUniform

- All Implemented Interfaces:
    JCGLNamedType, JCGLProgramUniformType, JCGLResourceUsableType

      public final class FakeProgramUniform
      extends Object
      implements JCGLProgramUniformType

  A fake implementation of program attributes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FakeProgramUniform(FakeContext in_context, JCGLProgramShaderUsableType in_program, int in_location, String in_name, JCGLType in_type, int in_size)` Construct a uniform.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected FakeContext` | `getContext()`
    `int` | `glName()`
    `boolean` | `isDeleted()`
    `String` | `name()`
    `JCGLProgramShaderUsableType` | `program()`
    `protected void` | `setDeleted()`
    `int` | `size()`
    `JCGLType` | `type()`

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

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

- - ### Constructor Detail

    - #### FakeProgramUniform

          public FakeProgramUniform(FakeContext in_context,
                                    JCGLProgramShaderUsableType in_program,
                                    int in_location,
                                    String in_name,
                                    JCGLType in_type,
                                    int in_size)

      Construct a uniform.
      Parameters:
        `in_context` - The context
        `in_program` - The owning program
        `in_location` - The uniform location
        `in_name` - The uniform name
        `in_type` - The uniform type
        `in_size` - The size of the uniform in elements

  - ### Method Detail

    - #### name

          public String name()

      Specified by:
        `name` in interface `JCGLProgramUniformType`
      Returns:
        The name of the uniform. This is the name of the uniform as declared in the respective shading program.

    - #### program

          public JCGLProgramShaderUsableType program()

      Specified by:
        `program` in interface `JCGLProgramUniformType`
      Returns:
        A reference to the program that owns the uniform.

    - #### type

          public JCGLType type()

      Specified by:
        `type` in interface `JCGLProgramUniformType`
      Returns:
        The OpenGL type of the uniform.

    - #### size

          public int size()

      Specified by:
        `size` in interface `JCGLProgramUniformType`
      Returns:
        The size of the uniform (the number of elements of the array, if the uniform is of an array type)

    - #### glName

          public int glName()

      Specified by:
        `glName` in interface `JCGLNamedType`
      Returns:
        The raw OpenGL 'name' of the object.

    - #### getContext

          protected final FakeContext getContext()

    - #### isDeleted

          public final boolean isDeleted()

      Specified by:
        `isDeleted` in interface `JCGLResourceUsableType`
      Returns:
        `true` iff the given resource has been deleted.

    - #### setDeleted

          protected final void setDeleted()

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