示例#1
0
 /**
  * Calls {@link RenderableProvider#getRenderables(Array, Pool)} and adds all returned {@link
  * Renderable} instances to the current batch to be rendered. Any lights set on the returned
  * renderables will be replaced with the given lights. Any shaders set on the returned renderables
  * will be replaced by the given {@link Shader}.
  *
  * @param renderableProvider the renderable provider
  * @param lights the lights to use for the renderables
  * @param shader the shader to use for the renderables
  */
 public void render(
     final RenderableProvider renderableProvider, final Lights lights, final Shader shader) {
   int offset = renderables.size;
   renderableProvider.getRenderables(renderables, renderablesPool);
   for (int i = offset; i < renderables.size; i++) {
     Renderable renderable = renderables.get(i);
     renderable.lights = lights;
     renderable.shader = shader;
     renderable.shader = shaderProvider.getShader(renderable);
     reuseableRenderables.add(renderable);
   }
 }
示例#2
0
 @Override
 public void dispose() {
   shaderProvider.dispose();
 }
示例#3
0
 public void render(final Renderable renderable) {
   renderable.shader = shaderProvider.getShader(renderable);
   renderable.mesh.setAutoBind(false);
   renderables.add(renderable);
 }