/** Construct a ModelBatch, using this constructor makes you responsible for calling context.begin() and context.end() yourself. * @param context The {@link RenderContext} to use. * @param shaderProvider The {@link ShaderProvider} to use, will be disposed when this ModelBatch is disposed. * @param sorter The {@link RenderableSorter} to use. */ public ModelBatch (final RenderContext context, final ShaderProvider shaderProvider, final RenderableSorter sorter) { this.sorter = (sorter == null) ? new DefaultRenderableSorter() : sorter; this.ownContext = (context == null); this.context = (context == null) ? new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1)) : context; this.shaderProvider = (shaderProvider == null) ? new DefaultShaderProvider() : shaderProvider; }
/** Construct a ModelBatch, using this constructor makes you responsible for calling context.begin() and context.end() yourself. * @param context The {@link RenderContext} to use. * @param sorter The {@link RenderableSorter} to use. */ public ModelBatch (final RenderContext context, final RenderableSorter sorter) { this(context, null, sorter); }
/** Construct a ModelBatch * @param shaderProvider The {@link ShaderProvider} to use, will be disposed when this ModelBatch is disposed. * @param sorter The {@link RenderableSorter} to use. */ public ModelBatch (final ShaderProvider shaderProvider, final RenderableSorter sorter) { this(null, shaderProvider, sorter); }
/** Construct a ModelBatch * @param sorter The {@link RenderableSorter} to use. */ public ModelBatch (final RenderableSorter sorter) { this(null, null, sorter); }
/** @return the {@link RenderableSorter} used by this ModelBatch. */ public RenderableSorter getRenderableSorter () { return sorter; }