4

I have been unsuccessful trying to use the OpenGL driver with ILNumerics visualizations. I am trying to just do a basic visualization following Quick Start guide - every time I launch the application I get the error message "no compatible hardware accelerated driver could be found or activated" with error reported "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". The graphics driver falls back to GDI which is really slow.

I have tried all of the suggested fixes for this problem. I installed the latest Intel HD graphics driver, and I ran OpenGL Extensions viewer which indicates that OpenGL 4.0 is supported. ILNumerics documentation indicates 3.1+ is required, which my system appears to support.

So I am at a loss here. Is there a way to use hardware rendering with this Intel card, or not?

4

2 回答 2

2

我也一直在尝试使用 ILNumerics OpenGL 驱动程序,但使用的是 Intel HD4000。我得到了同样的错误,调试日志显示 ILNumerics 在 glDrawElements 调用时崩溃。

我在初始化 ilPlotCube 时发现了一种解决方法,这样 OpenGL 驱动程序就不会崩溃。我正在使用来自 NuGet 的 Window Forms ilPanel 控件和 ilNumerics 3.2.2.0。

  • 在 ilPanel_load 事件中创建一个 ilPlotCube 并将 x 轴刻度设置为对数。将 plotcube 添加到场景中。
  • 将 ilPoint 元素添加到 plotcube。我用随机数据填充它。
  • 对我来说,它运行并且使用 OpenGL 驱动程序加载绘图控件而不会崩溃。

    void ilPanel1_Load(object sender, EventArgs e)
    {                     
        var pc = new ILPlotCube(twoDMode: false);
        // Set an axis scale to logarithmic so the GL driver will not crash
        pc.ScaleModes.XAxisScale = AxisScale.Logarithmic;
    
        // Create a new scene
        var scene = new ILScene();  
        scene.Add(pc);            
        this.ilPanel1.Scene = scene;
    
        // Add points to the scene so the GL driver will not crash
        this.AddPoints();
    }
    
    /// <summary>
    /// Add an ILPoints object so GL driver will not crash
    /// </summary>
    private void AddPoints()
    {
        var pc = ilPanel1.Scene.First<ILPlotCube>();
    
        ILArray<float> A = ILMath.tosingle(ILMath.rand(3, 1000));
        var points = new ILPoints
        {
            Positions = A,
            Colors = A,
            Size = 2,
        };
    
        pc.Add(points);
        this.points = points;
    }
    

如果控件使用 OpenGL 驱动程序成功加载,则从场景中删除点元素。根据需要设置轴刻度。添加另一个图表元素来绘制您想要绘制的实际事物。

        // Remove the ILPoints shape
        if (this.points != null && ilPanel1.Scene.Contains(points))
        {
            ilPanel1.Scene.Remove(this.points);
            this.points = null;
        }

        // Set the axis scale back to linear
        var pcsm = ilPanel1.Scene.First<ILPlotCube>().ScaleModes;
        pcsm.XAxisScale = AxisScale.Linear;

        // Add actual plots here
于 2013-10-17T20:51:37.843 回答
1

英特尔高清显卡通常会导致 OpenGL 出现问题。您应该在 Intel bugtracker 上提交错误报告并使用支持 OpenGL 3.1 的显卡——真的。

于 2013-10-16T15:17:06.447 回答