コード例 #1
0
 public static Model Load(DirectXDevice graphicsDevice, Stream stream, string assetName)
 {
     using (var serializer = new ModelReader(graphicsDevice, stream))
     {
         Model model = serializer.ReadModel();
         if (string.IsNullOrEmpty(model.Name))
         {
             model.Name = assetName;
         }
         model.RegisterResources();
         return(model);
     }
 }
コード例 #2
0
ファイル: Model.cs プロジェクト: chantsunman/Toolkit
 public static Model Load(GraphicsDevice graphicsDevice, Stream stream, ModelMaterialTextureLoaderDelegate textureLoader)
 {
     using (var serializer = new ModelReader(graphicsDevice, stream, textureLoader))
     {
         return serializer.ReadModel();
     }
 }