我想使用硬件渲染将viewport3d视觉渲染到图像。我怎么能用SlimDX做到这一点?我正在使用WPF& VB.NET 4.0和SlimDX。任何提示都会有所帮助,提前谢谢。 :)
以下是我用于渲染viewport3d的代码,它非常慢并且结果不佳:
//rendering viewport3D to image
Dim viewportPlate As New RenderTargetBitmap(600, 600, 96 , 96 , PixelFormats.Pbgra32)
viewportPlate.Render(viewport3d)
//path to save
Dim path As String = imgSave
Dim fs As FileStream = New FileStream(path, FileMode.Create)
//encoding to PNG and saving
Dim encoder As BitmapEncoder = New PngBitmapEncoder()
encoder.Frames.Add(BitmapFrame.Create(viewportPlate))
encoder.Save(fs)
PS:如果有人对如何使用除SlimDX之外的其他东西有更好的了解,我也会欢迎这些......