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.
- In the ilPanel_load event create an ilPlotCube and set the x-axis scale to logarithmic. Add the plotcube to the scene.
- Add an ilPoint element to the plotcube. I fill it with random data.
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