net.minecraftforge.client.model.pipeline.IVertexConsumer Java Examples
The following examples show how to use
net.minecraftforge.client.model.pipeline.IVertexConsumer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Quad.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 6 votes |
@Override public void pipe(IVertexConsumer consumer) { if (consumer instanceof ISmartVertexConsumer) { ((ISmartVertexConsumer) consumer).put(this); } else { consumer.setQuadTint(tintIndex); consumer.setQuadOrientation(orientation); consumer.setApplyDiffuseLighting(diffuseLighting); consumer.setTexture(sprite); for (Vertex v : vertices) { for (int e = 0; e < format.elementCount; e++) { consumer.put(e, v.raw[e]); } } } }
Example #2
Source File: BakedPipeline.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
/** * Call when you are ready to use the pipeline. * This builds the internal state of the Elements getting things ready to transform. * * @param collector The IVertexConsumer that should collect the transformed quad. */ public void prepare(IVertexConsumer collector) { IPipelineConsumer next = null; for (PipelineElement<?> element : elements) { if (element.isEnabled) { if (first == null) { first = element.consumer; } else { next.setParent(element.consumer); } next = element.consumer; } } next.setParent(collector); }
Example #3
Source File: QuadTransformer.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadTransformer(IVertexConsumer consumer) { this(consumer.getVertexFormat(), consumer); }
Example #4
Source File: QuadTransformer.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadTransformer(VertexFormat format, IVertexConsumer consumer) { this(CachedFormat.lookup(format), consumer); }
Example #5
Source File: QuadTransformer.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadTransformer(CachedFormat format, IVertexConsumer consumer) { this.format = format; this.consumer = consumer; quad = new Quad(format); }
Example #6
Source File: QuadTransformer.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void setParent(IVertexConsumer parent) { consumer = parent; }
Example #7
Source File: QuadClamper.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadClamper(IVertexConsumer parent, AxisAlignedBB bounds) { super(parent); clampBounds = bounds; }
Example #8
Source File: QuadTinter.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadTinter(IVertexConsumer consumer, int tint) { super(consumer); this.tint = tint; }
Example #9
Source File: QuadAlphaOverride.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadAlphaOverride(IVertexConsumer consumer, float alphaOverride) { super(consumer); this.alphaOverride = alphaOverride; }
Example #10
Source File: QuadFaceStripper.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 4 votes |
public QuadFaceStripper(IVertexConsumer parent, AxisAlignedBB bounds, int mask) { super(parent); this.bounds = bounds; this.mask = mask; }
Example #11
Source File: IPipelineConsumer.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 2 votes |
/** * Sets the parent consumer. * This consumer may choose to not pipe any data, * that's fine, but if it does, it MUST pipe the data to the one provided here. * * @param parent The parent. */ void setParent(IVertexConsumer parent);