/// <summary> /// Get a OpenGL materail from it's name /// </summary> /// <param name="key"></param> /// <returns></returns> public static GLMaterial Material(string key) { if (Materials.ContainsKey(key)) { return(Materials[key]); } return(GLMaterial.Default()); }
/// <summary> /// Get Default /// </summary> /// <returns></returns> public static RenderingContext Default() { RenderingContext ret = new RenderingContext(); ret.UseNormal = true; ret.UseObjectColor = true; ret.Wireframe = false; ret.DefaultFaceMaterial = GLMaterial.Default(); ret.DefaultLineMaterial = GLMaterial.Default(); ret.DefaultLineMaterial.Ambiant = Color.DarkGray; ret.Lightning = true; return(ret); }