Skip to content

Commit

Permalink
Fixed possibility of buffer name having a dash
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocelot5836 committed Jan 19, 2025
1 parent 822e175 commit 0e17b69
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
import org.joml.*;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.*;
import java.util.function.Function;

/**
Expand Down Expand Up @@ -99,14 +97,16 @@ public interface FieldSerializer<T> {
*/
public static class Builder<T> {

private static final Random RANDOM = new Random();

private final String name;
private final List<GlslStructField> structFields;
private final Map<String, FieldSerializer<T>> fields;
private ShaderBlock.BufferBinding binding;
private ShaderBlock.MemoryLayout memoryLayout;

public Builder() {
this.name = "VeilBuffer" + Long.hashCode(System.currentTimeMillis());
this.name = "VeilBuffer" + RANDOM.nextLong();
this.structFields = new ArrayList<>();
this.fields = new Object2ObjectArrayMap<>();
this.binding = ShaderBlock.BufferBinding.UNIFORM;
Expand Down

0 comments on commit 0e17b69

Please sign in to comment.