1Name 2 3 WGL_I3D_genlock 4 5Name Strings 6 7 WGL_I3D_genlock 8 9Contact 10 11 Dale Kirkland, Intense3D (kirkland 'at' intense3d.com) 12 13Status 14 15 Complete 16 17Version 18 19 Date: 04/17/2000 Revision 1.0 20 21Number 22 23 252 24 25Dependencies 26 27 The extension is written against the OpenGL 1.2.1 Specification 28 although it should work on any previous OpenGL specification. 29 30 The WGL_EXT_extensions_string extension is required. 31 32Overview 33 34 The genlock extensions allows application control of the genlock 35 features. Genlock is used to synchronize the refresh of the 36 monitor to an external signal. 37 38 There are five different parameters that can be used to control 39 genlock: 40 41 Enable/Disable 42 Source Selection 43 Source Sample Edge 44 Source Sample Rate 45 Source Delay 46 47IP Status 48 49 None 50 51Issues 52 53 None 54 55New Procedures and Functions 56 57 BOOL wglEnableGenlockI3D(HDC hDC) 58 59 BOOL wglDisableGenlockI3D(HDC hDC) 60 61 BOOL wglIsEnabledGenlockI3D(HDC hDC, 62 BOOL *pFlag) 63 64 BOOL wglGenlockSourceI3D(HDC hDC, 65 UINT uSource) 66 67 BOOL wglGetGenlockSourceI3D(HDC hDC, 68 UINT *uSource) 69 70 BOOL wglGenlockSourceEdgeI3D(HDC hDC, 71 UINT uEdge) 72 73 BOOL wglGetGenlockSourceEdgeI3D(HDC hDC, 74 UINT *uEdge) 75 76 BOOL wglGenlockSampleRateI3D(HDC hDC, 77 UINT uRate) 78 79 BOOL wglGetGenlockSampleRateI3D(HDC hDC, 80 UINT *uRate) 81 82 BOOL wglGenlockSourceDelayI3D(HDC hDC, 83 UINT uDelay) 84 85 BOOL wglGetGenlockSourceDelayI3D(HDC hDC, 86 UINT *uDelay) 87 88 BOOL wglQueryGenlockMaxSourceDelayI3D(HDC hDC, 89 UINT *uMaxLineDelay, 90 UINT *uMaxPixelDelay) 91 92New Tokens 93 94 Accepted by the <uSource> parameter of wglGenlockSourceI3D: 95 96 WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 97 WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 98 WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 99 WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 100 WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 101 WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 102 103 Accepted by the <uEdge> parameter of wglGenlockSourceEdgeI3D: 104 105 WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A 106 WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B 107 WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C 108 109Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) 110 111 None 112 113Additions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) 114 115 None 116 117Additions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment 118Operations and the Frame Buffer) 119 120 None 121 122Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) 123 124 None 125 126Additions to Chapter 6 of the OpenGL 1.2.1 Specification (State and 127State Requests) 128 129 None 130 131Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) 132 133 None 134 135Additions to the WGL Specification 136 137 The genlock trigger is used to synchronize the start of a frame 138 with a trigger pulse. If field data is being displayed (e.g. 139 frame-sequential stereo), the synchronization only occurs at the 140 frame boundary, not each field boundary. 141 142 The genlock trigger is derived from the genlock source. The 143 genlock source can be selected from six different inputs to the 144 system by calling wglGenlockSourceI3D. 145 146 BOOL wglGenlockSourceI3D(HDC hDC, 147 UINT uSource) 148 149 <hDC> is a device context for the graphics adapter or a window 150 residing on the graphics adapter that supports genlock. There is 151 only a single genlock source for each graphics adapter regardless 152 of the number of monitors supported by the adapter. 153 154 <uSource> specifies one of the following sources: 155 156 WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 157 Selects the multiview sync signal as the genlock source. 158 159 WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 160 Selects the external genlock vertical sync component. 161 162 WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 163 Selects the external genlock field component. 164 165 WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 166 Selects the external genlock as a TTL-level signal. 167 168 WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 169 Selects the digital genlock vertical sync component. 170 171 WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 172 Selects the digital genlock field component. 173 174 The current genlock source can be queried by calling 175 wglGetGenlockSourceI3D. 176 177 A genlock pulse is generated from the input source based on the 178 rising, falling, or both edges of the source. The edge selection 179 is set by calling wglGenlockSourceEdgeI3D. 180 181 BOOL wglGenlockSourceEdgeI3D(HDC hDC, 182 UINT uEdge) 183 184 <uEdge> specifies one of the following source edges modes used 185 to generate the genlock trigger. 186 187 WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 188 Selects the falling edge of the source. 189 190 WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 191 Selects the rising edge of the source. 192 193 WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 194 Selects both edges of the source. 195 196 The current genlock source edge mode can be queried with 197 wglGetGenlockSourceEdgeI3D. 198 199 The genlock trigger is generated by sampling the genlock pulses. 200 The sample rate of the genlock pulses is controlled by calling 201 wglGenlockSampleRateI3D. 202 203 BOOL wglGenlockSampleRateI3D(HDC hDC, 204 UINT uRate) 205 206 <uRate> specifies every nth pulse be used for the genlock trigger. 207 For example, if <uRate> were set to a value of 2, every other 208 genlock pulse would generate a genlock trigger. The minimum 209 value for <uRate> is 1. The maximum value for <uRate> is 6. 210 211 The current genlock sample rate can be queried by calling 212 wglGetGenlockSampleRateI3D. 213 214 The genlock trigger can be delayed up to an entire frame by 215 calling wglGenlockSourceDelayI3D. 216 217 BOOL wglGenlockSourceDelayI3D(HDC hDC, 218 UINT uDelay) 219 220 <uDelay> specifies the delay (in pixels) that the trigger is 221 delayed before being used to synchronize the screen refresh. 222 <uDelay> must be in the range [0, <maxDelay>] where <maxDelay> 223 is the number of pixel clocks needed to display an entire frame. 224 The maximum delay <maxDelay> can be calculated by the following 225 equation: 226 227 <maxDelay> = <maxLineDelay> * <maxPixelDelay> 228 229 where <maxLineDelay> and <maxPixelDelay> can be queried by 230 calling wglQueryGenlockMaxSourceDelayI3D. 231 232 BOOL wglQueryGenlockMaxSourceDelayI3D(HDC hDC, 233 UINT *uMaxLineDelay, 234 UINT *uMaxPixelDelay) 235 236 The current source delay can be queried by calling 237 wglGetGenlockSourceDelayI3D. 238 239 Genlock is enabled for each monitor by calling wglEnableGenlockI3D. 240 241 BOOL wglEnableGenlockI3D(HDC hDC) 242 243 Genlock is enabled for the monitor attached to the device with 244 the device context <hDC> of a window created on the monitor. 245 246 Genlock can be disabled for a monitor by calling 247 wglDisableGenlockI3D. 248 249 BOOL wglDisableGenlockI3D(HDC hDC) 250 251 The current genlock enable can be queried by calling 252 wglIsEnabledGenlockI3D. 253 254 In order to avoid synchronization to an incomplete genlock 255 specification, genlock should be disabled while the genlock 256 parameters are being changed. The exception to this is changing 257 the genlock trigger delay with wglGenlockSourceDelayI3D. 258 259Dependencies on WGL_EXT_extensions_string 260 261 Because there is no way to extend wgl, these calls are defined in 262 the ICD and can be called by obtaining the address with 263 wglGetProcAddress. Because this extension is a WGL extension, it 264 is not included in the GL_EXTENSIONS string. Its existence can be 265 determined with the WGL_EXT_extensions_string extension. 266 267Errors 268 269 If any of the genlock functions succeed, a value of TRUE is 270 returned. If a function fails, a value of FALSE is returned. To 271 get extended error information, call GetLastError. 272 273 ERROR_DC_NOT_FOUND The <hDC> was not valid. 274 275 ERROR_NO_SYSTEM_RESOURCES The genlock functionality is not 276 supported. 277 278 ERROR_INVALID_DATA <uSource> is not one of the valid 279 sources. 280 281 ERROR_INVALID_DATA <uEdge> is not one of the valid 282 source edge modes. 283 284 ERROR_INVALID_DATA <uRate> is less than a value of 1 or 285 greater than a value of 6. 286 287 ERROR_INVALID_DATA <uDelay> is greater than <maxDelay>. 288 289New State 290 291 None 292 293New Implementation Dependent State 294 295 None 296 297Revision History 298 299 10/26/1999 0.1 First draft. 300 04/17/2000 1.0 Released driver to ISVs. 301