예제 #1
0
        private async void Test3_Click(object sender, RoutedEventArgs e)
        {
            InitTest();
            FileOpenPicker picker1 = new FileOpenPicker();

            picker1.FileTypeFilter.Add("*");
            var file = await picker1.PickSingleFileAsync();

            if (file == null)
            {
                return;
            }
            var fOpen = (await file.OpenReadAsync()).AsStream();

            byte[] bData = new byte[fOpen.Length];
            fOpen.Read(bData, 0, (int)fOpen.Length);
            var task2 = await VertexShader.CompileAndCreateAsync(dcRenderView.GetDevice(), bData);

            VertexShader shader = task2;

            canvasview.SetVertexShader(shader);

            TestRender();//测试通过
        }