/// <summary> /// Construct a KhronosLogContext. /// </summary> /// <param name="khronoApiType"></param> public KhronosLogContext(Type khronoApiType) { QueryLogContext(khronoApiType); #if NETFRAMEWORK try { _LogMap = KhronosLogMap.Load(String.Format("OpenGL.KhronosLogMap{0}.xml", khronoApiType.Name)); } catch { /* Fail-safe */ } #endif }
/// <summary> /// Construct a KhronosLogContext. /// </summary> /// <param name="khronoApiType"> /// A <see cref="Type"/> that specifies the type of the class where to query log information. /// </param> public KhronosLogContext(Type khronoApiType) { QueryLogContext(khronoApiType); #if HAVE_SYSTEM_XML try { _LogMap = KhronosLogMap.Load($"OpenGL.KhronosLogMap{khronoApiType.Name}.xml"); } catch { /* Fail-safe */ } #endif }
/// <summary> /// Construct a KhronosLogContext. /// </summary> /// <param name="khronoApiType"> /// A <see cref="Type"/> that specifies the type of the class where to query log information. /// </param> /// <param name="logMap"> /// A <see cref="KhronosLogMap"/> holding metadata for <paramref name="khronoApiType"/>. /// </param> public KhronosLogContext(Type khronoApiType, KhronosLogMap logMap) { QueryLogContext(khronoApiType); if (logMap == null) { #if HAVE_SYSTEM_XML try { _LogMap = KhronosLogMap.Load($"OpenGL.KhronosLogMap{khronoApiType.Name}.xml"); } catch { /* Fail-safe */ } #endif } else { _LogMap = logMap; } }