我正在尝试在WPF窗口中使用SharpGL创建Revit扩展,并且无法获得超过10的FPS.WPF和SharpGL在没有Revit的情况下一起工作 . 这是简单的代码

public class Class1 : IExternalCommand
{
    public Result Execute(
      ExternalCommandData commandData,
      ref string message,
      ElementSet elements)
    {
        System.Windows.Application app = new System.Windows.Application();
        app.Run(new MainWindow());
        return Result.Succeeded;
    }
}

Revit Execute运行WPF的MainWindow,它在10FPS时不会产生任何效果!

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }

    private void OpenGLControl_OpenGLDraw(object sender, OpenGLEventArgs args)
    {
        OpenGL gl = args.OpenGL;
        gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);
    }
}

有没有办法让它平滑,或者我应该停止使用SharpGL并使用WPF?