generateDefines method

String generateDefines(
  1. dynamic defines
)

Implementation

String generateDefines(defines) {
  final chunks = [];

  if (defines != null) {
    for (final name in defines.keys) {
      final value = defines[name];

      if (value == false) continue;

      // print("WebGLProgramExtra generateDefines name: ${name} value: ${value} ");
      chunks.add('#define $name $value');
    }
  }

  return chunks.join('\n');
}