15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    WGL_I3D_genlock
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    WGL_I3D_genlock
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Dale Kirkland, Intense3D (kirkland 'at' intense3d.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciStatus
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Complete
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciVersion
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Date: 04/17/2000   Revision 1.0
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciNumber
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    252
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciDependencies
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    The extension is written against the OpenGL 1.2.1 Specification
285bd8deadSopenharmony_ci    although it should work on any previous OpenGL specification.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    The WGL_EXT_extensions_string extension is required.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciOverview
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    The genlock extensions allows application control of the genlock
355bd8deadSopenharmony_ci    features.  Genlock is used to synchronize the refresh of the
365bd8deadSopenharmony_ci    monitor to an external signal.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    There are five different parameters that can be used to control
395bd8deadSopenharmony_ci    genlock:
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci         Enable/Disable
425bd8deadSopenharmony_ci         Source Selection
435bd8deadSopenharmony_ci         Source Sample Edge
445bd8deadSopenharmony_ci         Source Sample Rate
455bd8deadSopenharmony_ci         Source Delay
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciIP Status
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    None
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ciIssues
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    None
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ciNew Procedures and Functions
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    BOOL wglEnableGenlockI3D(HDC hDC)
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    BOOL wglDisableGenlockI3D(HDC hDC)
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    BOOL wglIsEnabledGenlockI3D(HDC hDC,
625bd8deadSopenharmony_ci                                BOOL *pFlag)
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    BOOL wglGenlockSourceI3D(HDC hDC,
655bd8deadSopenharmony_ci                             UINT uSource)
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    BOOL wglGetGenlockSourceI3D(HDC hDC,
685bd8deadSopenharmony_ci                                UINT *uSource)
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    BOOL wglGenlockSourceEdgeI3D(HDC hDC,
715bd8deadSopenharmony_ci                                 UINT uEdge)
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci    BOOL wglGetGenlockSourceEdgeI3D(HDC hDC,
745bd8deadSopenharmony_ci                                    UINT *uEdge)
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci    BOOL wglGenlockSampleRateI3D(HDC hDC,
775bd8deadSopenharmony_ci                                 UINT uRate)
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    BOOL wglGetGenlockSampleRateI3D(HDC hDC,
805bd8deadSopenharmony_ci                                    UINT *uRate)
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    BOOL wglGenlockSourceDelayI3D(HDC hDC,
835bd8deadSopenharmony_ci                                  UINT uDelay)
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    BOOL wglGetGenlockSourceDelayI3D(HDC hDC,
865bd8deadSopenharmony_ci                                      UINT *uDelay)
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci    BOOL wglQueryGenlockMaxSourceDelayI3D(HDC hDC,
895bd8deadSopenharmony_ci                                          UINT *uMaxLineDelay,
905bd8deadSopenharmony_ci                                          UINT *uMaxPixelDelay)
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ciNew Tokens
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    Accepted by the <uSource> parameter of wglGenlockSourceI3D:
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_MULTIVIEW_I3D            0x2044
975bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D        0x2045
985bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D       0x2046
995bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D         0x2047
1005bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D         0x2048
1015bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D        0x2049
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    Accepted by the <uEdge> parameter of wglGenlockSourceEdgeI3D:
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D         0x204A
1065bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_RISING_I3D          0x204B
1075bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D            0x204C
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    None
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    None
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
1185bd8deadSopenharmony_ciOperations and the Frame Buffer)
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    None
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci    None
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and
1275bd8deadSopenharmony_ciState Requests)
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    None
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    None
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciAdditions to the WGL Specification
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    The genlock trigger is used to synchronize the start of a frame
1385bd8deadSopenharmony_ci    with a trigger pulse.  If field data is being displayed (e.g.
1395bd8deadSopenharmony_ci    frame-sequential stereo), the synchronization only occurs at the
1405bd8deadSopenharmony_ci    frame boundary, not each field boundary.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    The genlock trigger is derived from the genlock source.  The
1435bd8deadSopenharmony_ci    genlock source can be selected from six different inputs to the
1445bd8deadSopenharmony_ci    system by calling wglGenlockSourceI3D.
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci      BOOL wglGenlockSourceI3D(HDC hDC,
1475bd8deadSopenharmony_ci                               UINT uSource)
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    <hDC> is a device context for the graphics adapter or a window
1505bd8deadSopenharmony_ci    residing on the graphics adapter that supports genlock.  There is
1515bd8deadSopenharmony_ci    only a single genlock source for each graphics adapter regardless
1525bd8deadSopenharmony_ci    of the number of monitors supported by the adapter.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    <uSource> specifies one of the following sources:
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_MULTIVIEW_I3D
1575bd8deadSopenharmony_ci        Selects the multiview sync signal as the genlock source.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D
1605bd8deadSopenharmony_ci        Selects the external genlock vertical sync component.
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D
1635bd8deadSopenharmony_ci        Selects the external genlock field component.
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D
1665bd8deadSopenharmony_ci        Selects the external genlock as a TTL-level signal.
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D
1695bd8deadSopenharmony_ci        Selects the digital genlock vertical sync component.
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D
1725bd8deadSopenharmony_ci        Selects the digital genlock field component.
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    The current genlock source can be queried by calling
1755bd8deadSopenharmony_ci    wglGetGenlockSourceI3D.
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    A genlock pulse is generated from the input source based on the
1785bd8deadSopenharmony_ci    rising, falling, or both edges of the source.  The edge selection
1795bd8deadSopenharmony_ci    is set by calling wglGenlockSourceEdgeI3D.
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci      BOOL wglGenlockSourceEdgeI3D(HDC hDC,
1825bd8deadSopenharmony_ci                                   UINT uEdge)
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci    <uEdge> specifies one of the following source edges modes used
1855bd8deadSopenharmony_ci    to generate the genlock trigger.
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D
1885bd8deadSopenharmony_ci        Selects the falling edge of the source.
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_RISING_I3D
1915bd8deadSopenharmony_ci        Selects the rising edge of the source.
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci      WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D
1945bd8deadSopenharmony_ci        Selects both edges of the source.
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ci    The current genlock source edge mode can be queried with
1975bd8deadSopenharmony_ci    wglGetGenlockSourceEdgeI3D.
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci    The genlock trigger is generated by sampling the genlock pulses.
2005bd8deadSopenharmony_ci    The sample rate of the genlock pulses is controlled by calling
2015bd8deadSopenharmony_ci    wglGenlockSampleRateI3D.
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ci      BOOL wglGenlockSampleRateI3D(HDC hDC,
2045bd8deadSopenharmony_ci                                   UINT uRate)
2055bd8deadSopenharmony_ci
2065bd8deadSopenharmony_ci    <uRate> specifies every nth pulse be used for the genlock trigger.
2075bd8deadSopenharmony_ci    For example, if <uRate> were set to a value of 2, every other
2085bd8deadSopenharmony_ci    genlock pulse would generate a genlock trigger.  The minimum
2095bd8deadSopenharmony_ci    value for <uRate> is 1.  The maximum value for <uRate> is 6.
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci    The current genlock sample rate can be queried by calling
2125bd8deadSopenharmony_ci    wglGetGenlockSampleRateI3D.
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci    The genlock trigger can be delayed up to an entire frame by
2155bd8deadSopenharmony_ci    calling wglGenlockSourceDelayI3D.
2165bd8deadSopenharmony_ci
2175bd8deadSopenharmony_ci      BOOL wglGenlockSourceDelayI3D(HDC hDC,
2185bd8deadSopenharmony_ci                                    UINT uDelay)
2195bd8deadSopenharmony_ci
2205bd8deadSopenharmony_ci    <uDelay> specifies the delay (in pixels) that the trigger is
2215bd8deadSopenharmony_ci    delayed before being used to synchronize the screen refresh.
2225bd8deadSopenharmony_ci    <uDelay> must be in the range [0, <maxDelay>] where <maxDelay>
2235bd8deadSopenharmony_ci    is the number of pixel clocks needed to display an entire frame.
2245bd8deadSopenharmony_ci    The maximum delay <maxDelay> can be calculated by the following
2255bd8deadSopenharmony_ci    equation:
2265bd8deadSopenharmony_ci
2275bd8deadSopenharmony_ci          <maxDelay> = <maxLineDelay> * <maxPixelDelay>
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci    where <maxLineDelay> and <maxPixelDelay> can be queried by
2305bd8deadSopenharmony_ci    calling wglQueryGenlockMaxSourceDelayI3D.
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci      BOOL wglQueryGenlockMaxSourceDelayI3D(HDC hDC,
2335bd8deadSopenharmony_ci                                            UINT *uMaxLineDelay,
2345bd8deadSopenharmony_ci                                            UINT *uMaxPixelDelay)
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci    The current source delay can be queried by calling
2375bd8deadSopenharmony_ci    wglGetGenlockSourceDelayI3D.
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_ci    Genlock is enabled for each monitor by calling wglEnableGenlockI3D.
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ci      BOOL wglEnableGenlockI3D(HDC hDC)
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci    Genlock is enabled for the monitor attached to the device with
2445bd8deadSopenharmony_ci    the device context <hDC> of a window created on the monitor.
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci    Genlock can be disabled for a monitor by calling
2475bd8deadSopenharmony_ci    wglDisableGenlockI3D.
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci      BOOL wglDisableGenlockI3D(HDC hDC)
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    The current genlock enable can be queried by calling
2525bd8deadSopenharmony_ci    wglIsEnabledGenlockI3D.
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci    In order to avoid synchronization to an incomplete genlock
2555bd8deadSopenharmony_ci    specification, genlock should be disabled while the genlock
2565bd8deadSopenharmony_ci    parameters are being changed.  The exception to this is changing
2575bd8deadSopenharmony_ci    the genlock trigger delay with wglGenlockSourceDelayI3D.
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ciDependencies on WGL_EXT_extensions_string
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci    Because there is no way to extend wgl, these calls are defined in
2625bd8deadSopenharmony_ci    the ICD and can be called by obtaining the address with
2635bd8deadSopenharmony_ci    wglGetProcAddress.  Because this extension is a WGL extension, it
2645bd8deadSopenharmony_ci    is not included in the GL_EXTENSIONS string.  Its existence can be
2655bd8deadSopenharmony_ci    determined with the WGL_EXT_extensions_string extension.
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ciErrors
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci    If any of the genlock functions succeed, a value of TRUE is
2705bd8deadSopenharmony_ci    returned.  If a function fails, a value of FALSE is returned.  To
2715bd8deadSopenharmony_ci    get extended error information, call GetLastError.
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci      ERROR_DC_NOT_FOUND         The <hDC> was not valid.
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci      ERROR_NO_SYSTEM_RESOURCES  The genlock functionality is not
2765bd8deadSopenharmony_ci                                 supported.
2775bd8deadSopenharmony_ci
2785bd8deadSopenharmony_ci      ERROR_INVALID_DATA         <uSource> is not one of the valid
2795bd8deadSopenharmony_ci                                 sources.
2805bd8deadSopenharmony_ci
2815bd8deadSopenharmony_ci      ERROR_INVALID_DATA         <uEdge> is not one of the valid
2825bd8deadSopenharmony_ci                                 source edge modes.
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci      ERROR_INVALID_DATA         <uRate> is less than a value of 1 or
2855bd8deadSopenharmony_ci                                 greater than a value of 6.
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci      ERROR_INVALID_DATA         <uDelay> is greater than <maxDelay>.
2885bd8deadSopenharmony_ci
2895bd8deadSopenharmony_ciNew State
2905bd8deadSopenharmony_ci
2915bd8deadSopenharmony_ci    None
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ciNew Implementation Dependent State
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci    None
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ciRevision History
2985bd8deadSopenharmony_ci
2995bd8deadSopenharmony_ci    10/26/1999  0.1  First draft.
3005bd8deadSopenharmony_ci    04/17/2000  1.0  Released driver to ISVs.
301