#VertexRendering.drawFilledBox() Draws something weird
5 messages · Page 1 of 1 (latest)
private static void renderFilled(WorldRenderContext context, double minX, double minY, double minZ, double maxX, double maxY, double maxZ, float[] colorComponents, float alpha) {
MatrixStack matrices = context.matrixStack();
Vec3d camera = context.camera().getPos();
matrices.push();
matrices.translate(-camera.x, -camera.y, -camera.z);
VertexConsumer quadConsumer = context.consumers().getBuffer(RenderLayer.getDebugQuads());
VertexRendering.drawFilledBox(matrices, quadConsumer, minX, minY, minZ, maxX, maxY, maxZ, colorComponents[0], colorComponents[1], colorComponents[2], alpha);
matrices.pop();
System.out.println("Should render outline" + "with colors: " + colorComponents[0] + ", " + colorComponents[1] + " and " + colorComponents[2] + " and with alpha: " + alpha);
System.out.println("Drawing box at: " + minX + ", " + minY + ", " + minZ);
}
Also it doesn't support alpha values
Did you check your vertex ordering?
(I have no idea if that's the actual problem, but it's common enough from what I've seen that it's a question worth asking)
No, as VertexRendering.drawFilledBox is a built in method, I assumed it's correct