class DefineList {

    public void generateSource(StringBuilder sb, List<String> defineNames, List<VarType> defineTypes) {
        for (int i = 0; i < values.length; i++) {
            if (!isSet(i)) {
                continue;
            }

            sb.append("#define ").append(defineNames.get(i)).append(' ');

            if (defineTypes != null && defineTypes.get(i) == VarType.Float) {
                float val = Float.intBitsToFloat(values[i]);
                if (Float.isInfinite(val) || Float.isNaN(val)) {
                    throw new IllegalArgumentException(
                            "GLSL does not support NaN "
                            + "or Infinite float literals");
                }
                sb.append(val);
            } else {
                sb.append(values[i]);
            }

            sb.append('\n');
        }
    }

    public  DefineList(int numValues);
    private  DefineList(DefineList original);

}