Skip to content

Commit

Permalink
ShaderProvider extends Disposable (#6215)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackRainy committed Oct 11, 2020
1 parent eef677b commit 98f410e
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@

package com.badlogic.gdx.graphics.g3d.utils;

import com.badlogic.gdx.graphics.g3d.Material;
import com.badlogic.gdx.graphics.g3d.Renderable;
import com.badlogic.gdx.graphics.g3d.Shader;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.utils.Disposable;

/** Returns {@link Shader} instances for a {@link Renderable} on request. Also responsible for disposing of any created
* {@link ShaderProgram} instances on a call to {@link #dispose()}.
* {@link Shader} instances on a call to {@link Disposable#dispose()}.
* @author badlogic */
public interface ShaderProvider {
public interface ShaderProvider extends Disposable {
/** Returns a {@link Shader} for the given {@link Renderable}. The RenderInstance may already contain a Shader, in which case
* the provider may decide to return that.
* @param renderable the Renderable
* @return the Shader to be used for the RenderInstance */
Shader getShader (Renderable renderable);

/** Disposes all resources created by the provider */
public void dispose ();
}

0 comments on commit 98f410e

Please sign in to comment.