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); } }
public static Model Load(GraphicsDevice graphicsDevice, Stream stream, ModelMaterialTextureLoaderDelegate textureLoader) { using (var serializer = new ModelReader(graphicsDevice, stream, textureLoader)) { return serializer.ReadModel(); } }