using System;
namespace Veldrid.SPIRV
{
///
/// An object used to control the options for compiling from GLSL to SPIR-V.
///
public class GlslCompileOptions
{
///
/// Indicates whether the compiled output should preserve debug information. NOTE: If the resulting SPIR-V is intended to
/// be used as the source of an OpenGL-style GLSL shader, then this property should be set to .
///
public bool Debug { get; set; }
///
/// An array of which defines the set of preprocessor macros to define when compiling the
/// GLSL source code.
///
public MacroDefinition[] Macros { get; set; }
///
/// Gets a default .
///
public static GlslCompileOptions Default { get; } = new GlslCompileOptions();
///
/// Constructs a new with default properties.
///
public GlslCompileOptions()
{
Macros = Array.Empty();
}
///
/// Constructs a new .
///
/// Indicates whether the compiled output should preserve debug information. NOTE: If the resulting
/// SPIR-V is intended to be used as the source of an OpenGL-style GLSL shader, then this property should be set to
/// .
/// An array of which defines the set of preprocessor macros to define
/// when compiling the GLSL source code.
public GlslCompileOptions(bool debug, params MacroDefinition[] macros)
{
Debug = debug;
Macros = macros ?? Array.Empty();
}
}
}