15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_video_output 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci WGL_NV_video_output 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Thomas True, Nvidia, ttrue@nvidia.com 125bd8deadSopenharmony_ci Ian Williams, Nvidia, iwilliams@nvidia.com 135bd8deadSopenharmony_ci Martin Schwarzer, Nvidia, mschwarzer@nvidia.com 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciStatus 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci Shipping since 2004 for NVIDIA Quadro SDI (Serial Digital Interface) 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciVersion 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci Last Modified Date: February 20, 2008 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciNumber 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci 349 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciDependencies 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci OpenGL 1.1 is required. 305bd8deadSopenharmony_ci WGL_ARB_extension_string is required. 315bd8deadSopenharmony_ci WGL_ARB_pixel_format is required. 325bd8deadSopenharmony_ci WGL_ARB_pbuffer is required. 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciOverview 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci This extension permits a color and or depth buffer of a pbuffer to 375bd8deadSopenharmony_ci be used for rendering and subsequent video output. After a pbuffer 385bd8deadSopenharmony_ci has been bound to a video device, subsequent color and or depth 395bd8deadSopenharmony_ci rendering into that buffer is displayed on the video output. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciIssues 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci 1. Should the new pbuffer attributes be available through GL queries? 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci No, like other pbuffer attributes you need to query them through the 465bd8deadSopenharmony_ci window system extension. This extension does not make any changes to 475bd8deadSopenharmony_ci OpenGL. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciImplementation Notes 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci 1. Any created pbuffers must be the same resolution as that specified 525bd8deadSopenharmony_ci by the state of the video output device. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci 2. Applications may use a single pbuffer or a collection of pbuffers 555bd8deadSopenharmony_ci to send frames/fields to a video device. In the first case, an 565bd8deadSopenharmony_ci application should block on the call to wglSendPbufferToVideoNV() 575bd8deadSopenharmony_ci to ensure synchronization. In the second caes, an application 585bd8deadSopenharmony_ci should utilize wglGetVideoInfoNV() in order to query vblank and 595bd8deadSopenharmony_ci buffer counters for synchronization. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciIntended Usage 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci 1) Configure the video output device via the NVCPL API or via 645bd8deadSopenharmony_ci the control panel which uses the NVCPL API. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci 2) Call wglChoosePixelFormatARB and find a suitable pixel format 675bd8deadSopenharmony_ci for rendering images. WGL_DRAW_TO_PBUFFER and one of 685bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_NV, WGL_BIND_TO_VIDEO_RGBA_NV or 695bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV must be TRUE. The 705bd8deadSopenharmony_ci per-component pixel depth of the pbuffer must be equal to or 715bd8deadSopenharmony_ci greater than the per-component depth of the video output. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci 3) Create pbuffers and associated rendering contexts for each 745bd8deadSopenharmony_ci channel of video by calling wglCreatePbufferARB with one 755bd8deadSopenharmony_ci of WGL_BIND_TO_VIDEO_RGB_NV, WGL_BIND_TO_VIDEO_RGBA_NV or 765bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV tokens in the attribute 775bd8deadSopenharmony_ci list set to TRUE. Set the width and height for each pbuffer 785bd8deadSopenharmony_ci to match that of the intended video output device. 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci 4) Call wglGetVideoDeviceNV to retrieve the handles for all 815bd8deadSopenharmony_ci video devices available. A video device handle is required 825bd8deadSopenharmony_ci for each video stream. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci 5) Call wglBindVideoImageNV to bind each pbuffer drawable to a 855bd8deadSopenharmony_ci corresponding video device handle. 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci 6) Start transfers on each video device using the appropriate 885bd8deadSopenharmony_ci NVCPL API function call. 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci 7) Render the current frame/field for each stream to a 915bd8deadSopenharmony_ci pbuffer. Once rendering is complete, call 925bd8deadSopenharmony_ci wglSendPbufferToVideoNV() to send each frame/field to the video 935bd8deadSopenharmony_ci device. 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci 9) Render subsequent video frames or fields calling 965bd8deadSopenharmony_ci wglSendPbufferToVideoNV() at the completion of rendering for 975bd8deadSopenharmony_ci each frame/field. 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci 10) Stop transfers on the video device via the appropriate NVCPL 1005bd8deadSopenharmony_ci API function call. 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci 11) Call wglReleaseVideoImageNV to unbind each pbuffer drawable 1035bd8deadSopenharmony_ci from its associated video device. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ciNew Procedures and Functions 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci DECLARE_HANDLE(HPVIDEODEV); 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci BOOL wglGetVideoDeviceNV(HDC hDC, int numDevices, 1105bd8deadSopenharmony_ci HPVIDEODEV *hVideoDevice); 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci BOOL wglReleaseVideoDeviceNV(HPVIDEODEV hVideoDevice); 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci BOOL wglBindVideoImageNV (HPVIDEODEV hVideoDevice, 1155bd8deadSopenharmony_ci HPBUFFERARB hPbuffer, int iVideoBuffer); 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci BOOL wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci BOOL wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, 1205bd8deadSopenharmony_ci unsigned long *pulCounterPbuffer, 1215bd8deadSopenharmony_ci BOOL bBlock); 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci BOOL wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, 1245bd8deadSopenharmony_ci unsigned long *pulCounterOutputPbuffer, 1255bd8deadSopenharmony_ci unsigned long *pulCounterOutputVideo); 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ciNew Tokens 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci Accepted by the <piAttributes> parameter of wglGetPixelFormatAttribivARB, 1305bd8deadSopenharmony_ci wglGetPixelFormatAttribfvARB, and the <piAttribIList> and <pfAttribIList> 1315bd8deadSopenharmony_ci parameters of wglChoosePixelFormatARB and wglCreatePbufferARB: 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 1345bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 1355bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci Accepted by the <iVideoBuffer> parameter of wglBindVideoImageNV and 1385bd8deadSopenharmony_ci wglReleaseVideoImageNV: 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci WGL_VIDEO_OUT_COLOR_NV 0x20C3 1415bd8deadSopenharmony_ci WGL_VIDEO_OUT_ALPHA_NV 0x20C4 1425bd8deadSopenharmony_ci WGL_VIDEO_OUT_DEPTH_NV 0x20C5 1435bd8deadSopenharmony_ci WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 1445bd8deadSopenharmony_ci WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci Accepted by the <iBufferType> parameter of wglSendPbufferToVideoNV: 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci WGL_VIDEO_OUT_FRAME 0x20C8 1495bd8deadSopenharmony_ci WGL_VIDEO_OUT_FIELD_1 0x20C9 1505bd8deadSopenharmony_ci WGL_VIDEO_OUT_FIELD_2 0x20CA 1515bd8deadSopenharmony_ci WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB 1525bd8deadSopenharmony_ci WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci None. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci None. 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment 1635bd8deadSopenharmony_ciOperations and the Frame Buffer) 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci None. 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci None. 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and State 1725bd8deadSopenharmony_ciRequests) 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci None. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ciAdditions to the WGL Specification 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci Add to the description of <piAttributes> in wglGetPixelFormatAttribivARB 1795bd8deadSopenharmony_ci and <pfAttributes> in wglGetPixelFormatfv: 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_NV 1825bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGBA_NV 1835bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci Add new table entries to match criteria in description of 1865bd8deadSopenharmony_ci wglChoosePixelFormatARB: 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci Attribute Type Match Criteria 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_NV boolean exact 1915bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGBA_NV boolean exact 1925bd8deadSopenharmony_ci WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV boolean exact 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci Add wglGetVideoDeviceNV: 1955bd8deadSopenharmony_ci 1965bd8deadSopenharmony_ci The command 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci BOOL wglGetVideoDeviceNV(HDC hDC, int numDevices, 1995bd8deadSopenharmony_ci HPVIDEODEV hpVideoDevice) 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci returns an array of upto <numDevices> handles to the available video 2025bd8deadSopenharmony_ci devices in the array <hpVideoDevice>. <numDevices> must be 2035bd8deadSopenharmony_ci non-negative, and <hpVideoDevice> must not be NULL. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci It is not an error if the number of available video devices is larger 2065bd8deadSopenharmony_ci that <numDevices>; in that case the first <numDevices> device handles 2075bd8deadSopenharmony_ci are returned. It is an error if <numDevices> is larger than the 2085bd8deadSopenharmony_ci number of available video devices. The order of devices returned in 2095bd8deadSopenharmony_ci <hpVideoDevice> is implementation dependent. 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci if wglGetVideoDeviceNV fails, FALSE is returned. To get extended 2125bd8deadSopenharmony_ci error information, call GetLastError. Possible errors are as follows: 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hDC> is not a valid handle. 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hpVideoDevice> is NULL. 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci ERROR_INVALID_VALUE <numDevices> is negative. 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci ERROR_INVALID_OPERATION The video devices are not configured. 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci ERROR_RESOURCE_NOT_AVAILABLE The number of video devices requested 2235bd8deadSopenharmony_ci are not available. 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Add wglReleaseVideoDeviceNV: 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci The command 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci BOOL wglReleaseVideoDeviceNV(HPVIDEODEV hVideoDevice) 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci releases all resources associated with <hpVideoDevice>. 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci If wglReleaseVideoDeviceNV fails, FALSE is returned. To get extended 2355bd8deadSopenharmony_ci error information, call GetLastError. Possible errors are as follows: 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hpVideoDevice> is not a valid handle. 2385bd8deadSopenharmony_ci 2395bd8deadSopenharmony_ci ERROR_INVALID_OPERATION The video device is not allocated. 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci Add wglBindVideoImageNV and wglReleaseVideoImageNV: 2435bd8deadSopenharmony_ci 2445bd8deadSopenharmony_ci The command 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci BOOL wglBindVideoImageNV (HPVIDEODEV hpVideoDevice, 2475bd8deadSopenharmony_ci HPBUFFERARB hPbuffer, 2485bd8deadSopenharmony_ci int iVideoBuffer); 2495bd8deadSopenharmony_ci 2505bd8deadSopenharmony_ci binds <hPbuffer> to <hpVideoDevice> for subsequent scanout where 2515bd8deadSopenharmony_ci <iVideoBuffer> specifies that <pbuffer> contains color, alpha or 2525bd8deadSopenharmony_ci depth data. Neither <pbuffer> nor <hpVideoDevice) can be NULL. 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci If wglBindVideoImageNV fails, FALSE is returned. To get extended 2555bd8deadSopenharmony_ci error information, call GetLastError. Possible errors are as follows: 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hPbuffer> is not a valid handle. 2585bd8deadSopenharmony_ci 2595bd8deadSopenharmony_ci ERROR_INVALID_DATA The pbuffer size is not correct. 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci ERROR_INVALID_OPERATION The video device is not yet configured. 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci The command 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci BOOL wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, 2675bd8deadSopenharmony_ci int iVideoBuffer); 2685bd8deadSopenharmony_ci 2695bd8deadSopenharmony_ci releases <hPbuffer> from a previously bound video device. The 2705bd8deadSopenharmony_ci parameter <iVideoBuffer> specifies that the pbuffer contains 2715bd8deadSopenharmony_ci color, alpha or depth data. <hPbuffer> may not be NULL. 2725bd8deadSopenharmony_ci 2735bd8deadSopenharmony_ci If wglReleaseVideoImageNV fails, FALSE is returned. To get extended 2745bd8deadSopenharmony_ci error information, call GetLastError. Possible errors are as follows: 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hPbuffer> is not a valid handle. 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci ERROR_INVALID_DATA <iBuffer> is not a valid value. 2795bd8deadSopenharmony_ci 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ci Add wglSendPbufferToVideoNV and wglGetVideoInfoNV: 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci The command 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci BOOL wglSendPbufferToVideoNV (HPBUFFER hPbuffer, int iBufferType, 2865bd8deadSopenharmony_ci unsigned long *pulCounterPbuffer, 2875bd8deadSopenharmony_ci BOOL bBlock); 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci indicates that rendering to the <hPbuffer> is complete and that the 2905bd8deadSopenharmony_ci completed frame/field contained within <hPbuffer> is ready for scan out 2915bd8deadSopenharmony_ci by the video device where <iBufferType> specifies that <hPbuffer> 2925bd8deadSopenharmony_ci contains the first field, second field, two stacked fields or a complete 2935bd8deadSopenharmony_ci frame. <hPbuffer> cannot be NULL. 2945bd8deadSopenharmony_ci An <iBufferType> of WGL_VIDEO_OUT_STACKED_FIELDS_1_2 indicates that 2955bd8deadSopenharmony_ci <hPbuffer> does contain field1 and field2 with field1 in the upper half 2965bd8deadSopenharmony_ci of <hPbuffer> and filed2 in the lower half, while 2975bd8deadSopenharmony_ci WGL_VIDEO_OUT_STACKED_FIELDS_2_1 indicates field2 in the upper half 2985bd8deadSopenharmony_ci of <hPbuffer> and filed1 in the lower half. 2995bd8deadSopenharmony_ci The flag <bBlock> specifies whether or not the call should block until 3005bd8deadSopenharmony_ci scan out of the specified frame/field is complete. 3015bd8deadSopenharmony_ci <pulCounterPbuffer> returns the total number of frames/fields sent to 3025bd8deadSopenharmony_ci the video device. 3035bd8deadSopenharmony_ci 3045bd8deadSopenharmony_ci If wglSendPbufferToVideoNV fails, FALSE is returned. To get extended 3055bd8deadSopenharmony_ci error information, call GetLastError. Possible errors are as follows: 3065bd8deadSopenharmony_ci 3075bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <HPBUFFER> is not a valid handle. 3085bd8deadSopenharmony_ci 3095bd8deadSopenharmony_ci ERROR_INVALID_DATA <iBufferType> is not a valid value. 3105bd8deadSopenharmony_ci 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci The command 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci BOOL wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, 3155bd8deadSopenharmony_ci unsigned long *pulCounterOutputPbuffer, 3165bd8deadSopenharmony_ci unsigned long *pulCounterOutputVideo); 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ci returns in <pulCounterOutputVideo> the absolute count of vertical 3195bd8deadSopenharmony_ci blanks on <hpVideoDevice> since transfers were started while 3205bd8deadSopenharmony_ci <pulCounterOutputPbuffer> returns the count of the current pbuffer 3215bd8deadSopenharmony_ci being scanned out by <hpVideoDevice>. 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ci If wglGetVideoInfoNV fails, FALSE is returned. To get extended error 3245bd8deadSopenharmony_ci information, call GetLastError. Possible errors include: 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci ERROR_INVALID_HANDLE <hPVIDEODEVICE> is not a valid handle. 3275bd8deadSopenharmony_ci 3285bd8deadSopenharmony_ciNew State 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci None 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ciUsage Examples 3335bd8deadSopenharmony_ci 3345bd8deadSopenharmony_ci TBD 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ciRevision History: 3375bd8deadSopenharmony_ci 3385bd8deadSopenharmony_ci 20 February 2008 3395bd8deadSopenharmony_ci public release 340