© 2016 Thorlabs Scientific Imaging
4 Programming (SDK)
177
4.3.17 is_DirectRenderer
Syntax
INT is_DirectRenderer (HIDS hCam, UINT nMode, void* pParam, UINT nSize)
Description
Note
The is_DirectRenderer() functions works under Linux only in OpenGL mode.
is_DirectRenderer() provides a set of advanced rendering functions and allows inserting overlay
data into the camera's live image without flicker. The graphics card functions of the Direct3D library
are supported under Windows.
The second input parameter nMode specifies the effect of the is_DirectRenderer() call.
The value of the third parameter pParam depends on the mode selected with nMode: For example,
when setting the overlay size (nMode = DR_SET_OVERLAY_SIZE), a pointer to an array of two values
(x and y) is passed (see code samples). When you load a bitmap image (nMode =
DR_LOAD_OVERLAY_FROM_FILE), pParam passes the path to the file (see code samples). The
required parameters are illustrated in the sample codes at the end of this section.
Notes
1. System requirements
To use the Direct3D functionality, the appropriate version of the Microsoft DirectX Runtime has
to be installed in your PC.
When you are using high-resolution cameras, the maximum texture size supported by the
graphics card should be at least 4096 x 4096 pixels. You can check the maximum texture size
by reading out the D3D_GET_MAX_OVERLAY_SIZE parameter.
The Direct3D mode automatically uses the Windows Desktop color depth setting for the
display.
Please also read the notes on graphics cards which are provided in the System requirements
chapter.
2. Displaying monochrome or raw data formats
To display monochrome or Bayer raw data in Direct3D, please set the appropriate constants using
the is_SetDisplayMode() function.
The nCommand input parameter is used to select the function mode. The pParam input parameter
depends on the selected function mode. If you select functions for setting or returning a value,
pParam contains a pointer to a variable of the UINT type. The size of the memory area to which
pParam refers is specified in the nSizeOfParam input parameter.
Input parameters
Returns either if Direct3D or OpenGL is