15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_swap_control_tear
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GLX_EXT_swap_control_tear
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Brian Nguyen, NVIDIA, brnguyen at nvidia.com
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContact
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Brian Nguyen, NVIDIA, brnguyen at nvidia.com
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciStatus
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Complete.
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciVersion
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    Version 1 (November 4, 2011)
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciNumber
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    414
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciDependencies
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    This specification is written against the GLX 1.4 specification, but
325bd8deadSopenharmony_ci    only GLX 1.1 or greater with the ARB_get_proc_address extension is
335bd8deadSopenharmony_ci    required, for glXQueryExtensionString and glXGetProcAddressARB
345bd8deadSopenharmony_ci    respectively.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    GLX_EXT_swap_control is required.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Based on WGL_EXT_swap_control_tear version 1.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension affects GLX_NV_swap_group.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciOverview
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    This extension extends the existing GLX_EXT_swap_control extension by
455bd8deadSopenharmony_ci    allowing a negative <interval> parameter to glXSwapIntervalEXT. The
465bd8deadSopenharmony_ci    negative <interval> allows late swaps to occur without synchronization
475bd8deadSopenharmony_ci    to the video frame. This reduces the visual stutter on late frames and
485bd8deadSopenharmony_ci    reduces the stall on subsequent frames.
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ciIP Status
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci    There are no known IP issues.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciIssues
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    This extension is incompatible with GLX_NV_swap_group. If a drawable is
575bd8deadSopenharmony_ci    currently part of a swap group, late unsynchronized swaps will implicitly be
585bd8deadSopenharmony_ci    disabled for that drawable.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ciNew Procedures and Functions
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci    None
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ciNew Tokens
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci    GLX_LATE_SWAPS_TEAR_EXT	 0x20F3
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL
695bd8deadSopenharmony_ciOperation)
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    None.
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization)
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    None.
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment
785bd8deadSopenharmony_ciOperations and the Frame Buffer)
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    None.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special
835bd8deadSopenharmony_ciFunctions)
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    None.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and
885bd8deadSopenharmony_ciState Requests)
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    None.
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ciAdditions to the GLX 1.4 Specification
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    In Section 3.3.10 of the GLX specification (Double
955bd8deadSopenharmony_ci    Buffering), after the following paragraph:
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    "If <interval> is set to a value of 0, buffer swaps are not
985bd8deadSopenharmony_ci    synchronized to a video frame.  The <interval> value is silently
995bd8deadSopenharmony_ci    clamped to the maximum implementation-dependent value supported
1005bd8deadSopenharmony_ci    before being stored."
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ci    Add the following paragraph:
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    "If <interval> is negative, the minimum number of video frames between
1055bd8deadSopenharmony_ci    buffer swaps is the absolute value of <interval>. In this case, if
1065bd8deadSopenharmony_ci    abs(<interval>) video frames have already passed from the previous swap
1075bd8deadSopenharmony_ci    when the swap is ready to be performed, the swap will occur without
1085bd8deadSopenharmony_ci    synchronization to a video frame. When an unsynchronized swap happens,
1095bd8deadSopenharmony_ci    the missed frame will count towards the minimum number of video frames
1105bd8deadSopenharmony_ci    for the next swap."
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    In Section 3.3.10 of the GLX specification (Double
1135bd8deadSopenharmony_ci    Buffering), modify the paragraph beginning:
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    "The current swap interval and implementation-dependent max swap
1165bd8deadSopenharmony_ci    interval for a particular drawable..."
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    To read:
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    "The current swap interval and implementation-dependent max swap
1215bd8deadSopenharmony_ci    interval for a particular drawable can be obtained by calling
1225bd8deadSopenharmony_ci    glXQueryDrawable with the attributes GLX_SWAP_INTERVAL_EXT and
1235bd8deadSopenharmony_ci    GLX_MAX_SWAP_INTERVAL_EXT respectively. The application can also
1245bd8deadSopenharmony_ci    determine whether a particular drawable allows late unsynchronized
1255bd8deadSopenharmony_ci    swaps to occur by calling glXQueryDrawable with the attribute
1265bd8deadSopenharmony_ci    GLX_LATE_SWAPS_TEAR_EXT. If late swaps are enabled, <value> will
1275bd8deadSopenharmony_ci    be set to 1; otherwise, it will be set to 0. The value returned by
1285bd8deadSopenharmony_ci    glXQueryDrawable is undefined if the drawable is not a GLXWindow
1295bd8deadSopenharmony_ci    and these attributes are given."
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ciErrors
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    Remove the following error from GLX_EXT_swap_control:
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    "glXSwapIntervalEXT generates BadValue if parameter <interval> is
1365bd8deadSopenharmony_ci    less than zero."
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ciUsage Examples
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    Example 1: Set swap interval for the current drawable
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    Display *dpy = glXGetCurrentDisplay();
1435bd8deadSopenharmony_ci    GLXDrawable drawable = glXGetCurrentDrawable();
1445bd8deadSopenharmony_ci    const int interval = -1;
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    glXSwapIntervalEXT(dpy, drawable, interval);
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ciVersion History
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    1. 04 Nov 2011 - BrianN
1515bd8deadSopenharmony_ci	-Initial version
152