Class ShaderMaterial

Hierarchy (view full)

Implements

Constructors

    1. Creates a subscription to WebGL rendering context events but does not synchronize.
    2. Constructs vertex and fragment shader sources.
    3. Synchronizes with the WebGL rendering context if this is a top-level class (levelUp is zero).

    The contextManager must be defined.

    Parameters

    • vertexShaderSrc: string

      The vertex shader source code.

    • fragmentShaderSrc: string

      The fragment shader source code.

    • attribs: string[]

      The attribute ordering.

    • contextManager: ContextManager

      The ContextManager to subscribe to for WebGL rendering context events.

    • levelUp: number = 0

      The level of this class in the implementation inheritance hierarchy.

    Returns ShaderMaterial

Properties

contextManager: ContextManager

The ContextManager that will be subscribed to for WebGL rendering context events.

Accessors

Methods

  • Notifies this instance that something is referencing it.

    Returns number

    The new value of the reference count.

  • Returns the name that was assigned by the call to the setLoggingName method.

    Returns string

  • An object is a zombie if it has been released by all who have held references. In some cases it may be possible to recycle a zombie.

    Returns boolean

  • Notifies this instance that something is dereferencing it.

    Returns number

    The new value of the reference count.

  • This method is for use within constructors.

    Immediately after a call to the super class constructor, make a call to setLoggingName. This will have the effect of refining the name used for reporting reference counts.

    This method has the secondary purpose of enabling a tally of the number of classes in the constructor chain. This enables the runtime architecture to verify that destructor chains are consistent with constructor chains, which is a good practice for cleaning up resources.

    Notice that this method is intentionally protected to discourage it from being called outside of the constructor.

    Parameters

    • name: string

      This will usually be set to the name of the class.

    Returns void