Appendix G. Device Guide

This document lists various notes, capabilities, and limitations about each Visualize driver interface. These should be taken into consideration when programming your application as not every driver interface is as capable as the others. Some have external software dependencies, and some are not compatible with Visualize (due to bugs in the vendor drivers or other limitations). See the graphics card information page for more details.

In addition to conventional on-screen rendering, all driver interfaces additionally support hardware-accelerated rendering to a memory buffer. For information on how to set up an offscreen rendering context, see section 7.2 of the Core Graphics Programming Guide.

All Visualize windows are double-buffered.




DirectX11

The DirectX11 driver is supported in Windows 10, 8 and 7. For Windows Vista, DirectX11 requires Service Pack 2+, and installation of the most current Vista platform updates as of October 1, 2013.

In your code, the DirectX11 interface can be selected using the Window::Driver::DirectX11 enum value.

Use of this driver allows the developer to query and select which GPU to use when running on a system that has multiple GPUs. A common example would be running on a laptop which has both an integrated GPU and a discrete graphics card, which often yield significant differences in performance and power consumption.

Users can query GPUs using HPS::Database::ShowAvailableGPUs().

Users can select which GPU to use with the new function SetPreferredGPU(), which is available in the following classes:

Runtime Requirements

In order to use the DirectX11 driver, the d3dcompiler DLL must be made available in the execution environment of the target machine. We distribute this file with the Visualize package. If you are building with Visual Studio 2013 or 2015 (8.1 SDK or later) you need to include the file d3dcompiler_47.dll.




OpenGL

The OpenGL driver has been deprecated. Please upgrade your applications to OpenGL2.



The Visualize OpenGL driver interface requires the host platform to have OpenGL 1.1 or higher. Note that OpenGL 1.1 is not a shader-based API, so shaders and post-processing effects (which depend on shaders) will not work. OpenGL is supported on Windows and Linux.

Linux-specific information

For the OpenGL interface to work, X11 must be running on the host machine.

Limitations

When running an OpenGL application on one platform and displaying on another we have seen a few specific problems:

  • Drawing faces with the NoHandedness option requires a view-dependent normal calculation on CPU side, defeating any attempt to use display lists.
  • Environment maps in orthographic projection require view-dependent calculations on the CPU on vertex normals, also defeating display lists.
  • Effects which require shaders to implement properly are not supported. These include shadow maps, bump mapping, ambient occlusion, bloom, depth of field, and fast silhouettes.
  • If full-screen anti-aliasing is enabled, setting more than one layer of depth peeling in "depth peeling options" will have no effect.
  • 'opengl' image drivers no longer work with hardware simple shadows on OS X because Apple's pixel buffer implementation NSOpenGLPixelBuffer has been deprecated as of OS X 10.7. Consider using 'opengl2' for shadows instead.
  • Bump mapping is not supported
  • Model comparison mode is not supported

In your code, the OpenGL interface can be selected using the Window::Driver::OpenGL enum value.




OpenGL2

OpenGL2 is a shader-based driver interface that requires the host platform to have OpenGL 3.2+ or OpenGL ES 3.2+. The Visualize OpenGL2 driver interface is supported on all platforms.

Limitations

  • Post process effects (bloom, fast silhouettes, ambient occlusion, and depth of field) are not currently supported on iOS or Android due to GPU limitations on current devices.

In your code, the OpenGL2 interface can be selected using the Window::Driver::OpenGL2 enum value.