ILNumerics - Technical Computing Tools

High Performance Framework for Visualization

and Computing in Industry and Science

 

tgt

Driver Types

ILNumerics currently provides three renderer types: GDI, SVG and OpenGL. ILPanel allows the selection of the rendering driver at design time with the restriction to GDI+ and OpenGL. Select the Driver type in the Properties window in the ILPanel Visual Studio designer or programmatically in code:

By default, ILPanel is configured to use OpenGL as preferred driver. If OpenGL is not available, it falls back to GDI.

ILPanel.Driver allows one to select the driver manually:

This setting should be made early in the program. At best, before any other configuration / scene setup is done.

SVG is not supported for ILPanel, since SVG drivers do not have interactive capabilities.

GDI+ drivers support all features of hardware accelerated drivers like OpenGL and DirectX. They implement Z buffering for hidden line removal and are capable of handling light (vertex lighting only). The only prerequisite required is System.Drawing. However, be prepared that GDI drivers require significant more time for rendering due to the lack of hardware acceleration. Also, GDI output usually suffers from more simple rendering algorithms, hence may produce artefacts on smooth shaded  areas. Antialiasing is not supported by GDI drivers.

All pixel formats created by ILNumerics currently use an GDI Driver (ILGDIDriver). All PNG and JPG output in the ILNumerics web code component utilize the GDI driver also.

Stability and Fallback

ILPanel is designed to serve as reliable and robust interactive panel. By default, it utilizes OpenGL hardware acceleration. However, since not all machines are able to support recent enough versions of OpenGL, an automatic fallback to rendering by GDI is active. Currently, OpenGL 3.1 is required.

In order to stabilize the rendering experience, ILNumerics recognized common pitfalls with OpenGL rendering:

  • Buggy OpenGL drivers; drivers which claim to support OpenGL version 3.1 but failing to create a valid context or to render certain OpenGL 3.1 features.
  • Remote Desktop Transmissions; Some drivers do only support very elementary OpenGL versions (like 1.1) when utilizing a remote desktop connection.

As soon as an OpenGL rendering failure has beed detected, ILNumericcs initiates multiple recovering steps. If failure repeats, GDI driver based rendering is used instead. However, there might be situations, where such failures are silent and not recognizable by ILNumerics.

Such situations will usually cause artefacts or missing elements in the ILNumerics rendering output. If you encounter such problems, you can apply the following fix manually. The Setting switch instructs ILPanel to utilize an alternative rendering method in affected situations and should be applied either by code or by using the app.config:

 

Driver Feature Matrix

Feature GDI OpenGL DirectX1 SVG WebGL1
3D Rendering + + + + +
Transparency + + + + +
User Clipping + + + + +
Lighting Vertex Fragment Fragment Primitive Fragment
MaxNrLights unlimited unlimited unlimited unlimited unlimited
Hidden Objects Removal Z-Buffer in ILNumerics Depth Buffer in Open GL Depth Buffer in DirectX BSP Tree, Painters Depth Buffer, WebGL
Antialiasing No  Optional Optional  Always2 Optional
[1] driver development in progress; [2] all SVG renderer render primitives strictly antialiased
Community Edition  + + - + -
Professional Edition

+

+ + +

+

 

A nice example for offscreen rendering has been given by Scott Hanselmann on his blog.