コード例 #1
0
ファイル: GLConfig.cs プロジェクト: zanguixuan2/Sardauscan
 /// <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());
 }
コード例 #2
0
        /// <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);
        }