//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //************** Copyright (c) 2016-2019 Marko Pintera (marko.pintera@gmail.com). All rights reserved. *******************// using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using bs; namespace bs.Editor { /** @addtogroup Importer * @{ */ /// Contains import options you may use to control how is a shader imported. [ShowInInspector] public partial class ShaderImportOptions : ImportOptions { private ShaderImportOptions(bool __dummy0) { } protected ShaderImportOptions() { } /// /// Flags that control which shading languages should the BSL shader be converted into. This ultimately controls on /// which render backends it will be able to run on. /// [ShowInInspector] [NativeWrapper] public ShadingLanguageFlags Languages { get { return Internal_getlanguages(mCachedPtr); } set { Internal_setlanguages(mCachedPtr, value); } } /// /// Sets a define and its value. Replaces an existing define if one already exists with the provided name. /// /// Name of the define. /// Value to assign to the define. public void SetDefine(string define, string value) { Internal_setDefine(mCachedPtr, define, value); } /// Checks if the define exists and returns its value if it does. /// Name of the define to get the value for. /// value of the define. Only defined if the method returns true. /// True if the define was found, false otherwise. public bool GetDefine(string define, out string value) { return Internal_getDefine(mCachedPtr, define, out value); } /// Checks if the provided define exists. /// Name of the define to check. /// True if the define was found, false otherwise. public bool HasDefine(string define) { return Internal_hasDefine(mCachedPtr, define); } /// Unregisters a previously set define. /// Name of the define to unregister. public void RemoveDefine(string define) { Internal_removeDefine(mCachedPtr, define); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setDefine(IntPtr thisPtr, string define, string value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool Internal_getDefine(IntPtr thisPtr, string define, out string value); [MethodImpl(MethodImplOptions.InternalCall)] private static extern bool Internal_hasDefine(IntPtr thisPtr, string define); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_removeDefine(IntPtr thisPtr, string define); [MethodImpl(MethodImplOptions.InternalCall)] private static extern ShadingLanguageFlags Internal_getlanguages(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_setlanguages(IntPtr thisPtr, ShadingLanguageFlags value); } /** @} */ }