/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.mojang.blaze3d.buffers.GpuBufferSlice
 *  com.mojang.blaze3d.buffers.Std140Builder
 *  com.mojang.blaze3d.buffers.Std140SizeCalculator
 *  net.minecraft.class_11280
 *  net.minecraft.class_11280$class_11281
 *  org.joml.Matrix4f
 *  org.joml.Matrix4fc
 */
package meteordevelopment.meteorclient.renderer;

import com.mojang.blaze3d.buffers.GpuBufferSlice;
import com.mojang.blaze3d.buffers.Std140Builder;
import com.mojang.blaze3d.buffers.Std140SizeCalculator;
import java.nio.ByteBuffer;
import net.minecraft.class_11280;
import org.joml.Matrix4f;
import org.joml.Matrix4fc;

public class MeshUniforms {
    public static final int SIZE = new Std140SizeCalculator().putMat4f().putMat4f().get();
    private static final Data DATA = new Data();
    private static final class_11280<Data> STORAGE = new class_11280("Meteor - Mesh UBO", SIZE, 16);

    public static void flipFrame() {
        STORAGE.method_71100();
    }

    public static GpuBufferSlice write(Matrix4f proj, Matrix4f modelView) {
        MeshUniforms.DATA.proj = proj;
        MeshUniforms.DATA.modelView = modelView;
        return STORAGE.method_71102((class_11280.class_11281)DATA);
    }

    private static final class Data
    implements class_11280.class_11281 {
        private Matrix4f proj;
        private Matrix4f modelView;

        private Data() {
        }

        public void method_71104(ByteBuffer buffer) {
            Std140Builder.intoBuffer((ByteBuffer)buffer).putMat4f((Matrix4fc)this.proj).putMat4f((Matrix4fc)this.modelView);
        }

        public boolean equals(Object o) {
            return false;
        }
    }
}

