com.io7m.r2.core

## Class R2LightRenderer

- java.lang.Object
- - com.io7m.r2.core.R2LightRenderer

- All Implemented Interfaces:
    com.io7m.jcanephora.core.JCGLResourceUsableType, R2DeletableType, R2LightRendererType

      public final class R2LightRenderer
      extends Object
      implements R2LightRendererType

  The default implementation of the `R2LightRendererType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g3)` Delete the current object.
    `boolean` | `isDeleted()`
    `static R2LightRendererType` | `newRenderer(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type in_g, R2TextureDefaultsType in_texture_defaults, R2ShaderPreprocessingEnvironmentReadableType in_shader_env, R2IDPoolType in_pool, R2UnitQuadUsableType in_quad)` Construct a new renderer.
    `void` | `renderLights(R2GeometryBufferUsableType gbuffer, com.io7m.jareas.core.AreaInclusiveUnsignedLType area, Optional<R2LightBufferUsableType> lbuffer, com.io7m.jcanephora.profiler.JCGLProfilingContextType pc, com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextParentType uc, R2ShadowMapContextUsableType shadows, R2MatricesObserverType m, R2SceneLightsType s)` Render the given lights into the given light buffer.

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

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

- - ### Method Detail

    - #### newRenderer

          public static R2LightRendererType newRenderer(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type in_g,
                                                        R2TextureDefaultsType in_texture_defaults,
                                                        R2ShaderPreprocessingEnvironmentReadableType in_shader_env,
                                                        R2IDPoolType in_pool,
                                                        R2UnitQuadUsableType in_quad)

      Construct a new renderer.
      Parameters:
        `in_g` - An OpenGL interface
        `in_shader_env` - Access to shader sources
        `in_texture_defaults` - A set of default textures
        `in_pool` - An ID pool
        `in_quad` - A usable unit quad
      Returns:
        A new renderer

    - #### delete

          public void delete(com.io7m.jcanephora.core.api.JCGLInterfaceGL33Type g3)
                      throws R2Exception

      Description copied from interface: `R2DeletableType`
      Delete the current object.
      Specified by:
        `delete` in interface `R2DeletableType`
      Parameters:
        `g3` - An OpenGL interface
      Throws:
        `R2Exception` - On errors

    - #### isDeleted

          public boolean isDeleted()

      Specified by:
        `isDeleted` in interface `com.io7m.jcanephora.core.JCGLResourceUsableType`

    - #### renderLights

          public void renderLights(R2GeometryBufferUsableType gbuffer,
                                   com.io7m.jareas.core.AreaInclusiveUnsignedLType area,
                                   Optional<R2LightBufferUsableType> lbuffer,
                                   com.io7m.jcanephora.profiler.JCGLProfilingContextType pc,
                                   com.io7m.jcanephora.texture_unit_allocator.JCGLTextureUnitContextParentType uc,
                                   R2ShadowMapContextUsableType shadows,
                                   R2MatricesObserverType m,
                                   R2SceneLightsType s)

      Description copied from interface: `R2LightRendererType`

      Render the given lights into the given light buffer.

      If a light buffer is provided, it will be bound before evaluation and left bound after the method returns.

      Specified by:
        `renderLights` in interface `R2LightRendererType`
      Parameters:
        `gbuffer` - The populated geometry buffer
        `area` - The output viewport
        `lbuffer` - The output light buffer
        `pc` - A profiling context
        `uc` - A texture unit context
        `shadows` - A set of rendered shadow maps
        `m` - A matrix context
        `s` - The opaque lights

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