Reputation: 43
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?
Upvotes: 4
Views: 2073
Reputation: 36
I have also been trying to use the ILNumerics OpenGL driver but with an an Intel HD4000. I get the same error and the debug log shows that ILNumerics crashes with at the glDrawElements call.
I found a work around when initializing an ilPlotCube so that the OpenGL driver will not crash. I am using the Window Forms ilPanel control and ilNumerics 3.2.2.0 from NuGet.
For me this runs and the plot control loads using the OpenGL driver without crashing.
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;
}
If the control loads successfully with the OpenGL driver then remove the points element from the scene. Set the axis scale as desired. Add another charting element which plots the actual thing you want to plot.
// 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
Upvotes: 2
Reputation: 3362
Intel HD graphics often causes problems with OpenGL. You should file a bugreport on the Intel bugtracker and resort to a graphics card which does support OpenGL 3.1 - really.
Upvotes: 1