예제 #1
0
파일: ModelBatch.java 프로젝트: moly/libgdx
 /**
  * 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
파일: ModelBatch.java 프로젝트: moly/libgdx
 @Override
 public void dispose() {
   shaderProvider.dispose();
 }
예제 #3
0
파일: ModelBatch.java 프로젝트: moly/libgdx
 public void render(final Renderable renderable) {
   renderable.shader = shaderProvider.getShader(renderable);
   renderable.mesh.setAutoBind(false);
   renderables.add(renderable);
 }