Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a7346e9f
Commit
a7346e9f
authored
Dec 27, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Dec 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Enhance the wrapper functions for WGL_EXT_swap_control.
parent
0f050b3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
8 deletions
+36
-8
opengl.c
dlls/winex11.drv/opengl.c
+36
-8
No files found.
dlls/winex11.drv/opengl.c
View file @
a7346e9f
...
...
@@ -505,9 +505,11 @@ static BOOL has_opengl(void)
/* It doesn't matter if these fail. They'll only be used if the driver reports
the associated extension is available (and if a driver reports the extension
is available but fails to provide the functions, it's quite broken) */
#define LOAD_FUNCPTR(f) p##f =
(void*)pglXGetProcAddressARB((const unsigned char
*)#f)
#define LOAD_FUNCPTR(f) p##f =
pglXGetProcAddressARB((const GLubyte
*)#f)
/* ARB GLX Extension */
LOAD_FUNCPTR
(
glXCreateContextAttribsARB
);
/* SGI GLX Extension */
LOAD_FUNCPTR
(
glXSwapIntervalSGI
);
/* NV GLX Extension */
LOAD_FUNCPTR
(
glXAllocateMemoryNV
);
LOAD_FUNCPTR
(
glXFreeMemoryNV
);
...
...
@@ -3400,7 +3402,9 @@ static const char * WINAPI X11DRV_wglGetExtensionsStringEXT(void) {
* WGL_EXT_swap_control: wglGetSwapIntervalEXT
*/
static
int
WINAPI
X11DRV_wglGetSwapIntervalEXT
(
VOID
)
{
FIXME
(
"(),stub!
\n
"
);
/* GLX_SGI_swap_control doesn't have any provisions for getting the swap
* interval, so the swap interval has to be tracked. */
TRACE
(
"()
\n
"
);
return
swap_interval
;
}
...
...
@@ -3413,13 +3417,37 @@ static BOOL WINAPI X11DRV_wglSwapIntervalEXT(int interval) {
BOOL
ret
=
TRUE
;
TRACE
(
"(%d)
\n
"
,
interval
);
swap_interval
=
interval
;
if
(
NULL
!=
pglXSwapIntervalSGI
)
{
wine_tsx11_lock
();
ret
=
!
pglXSwapIntervalSGI
(
interval
);
wine_tsx11_unlock
();
if
(
interval
<
0
)
{
SetLastError
(
ERROR_INVALID_DATA
);
return
FALSE
;
}
else
if
(
interval
==
0
)
{
/* wglSwapIntervalEXT considers an interval value of zero to mean that
* vsync should be disabled, but glXSwapIntervalSGI considers such a
* value to be an error. Just silently ignore the request for now. */
WARN
(
"Request to disable vertical sync is not handled
\n
"
);
swap_interval
=
0
;
}
else
{
if
(
pglXSwapIntervalSGI
)
{
wine_tsx11_lock
();
ret
=
!
pglXSwapIntervalSGI
(
interval
);
wine_tsx11_unlock
();
}
else
WARN
(
"GLX_SGI_swap_control extension is not available
\n
"
);
if
(
ret
)
swap_interval
=
interval
;
else
SetLastError
(
ERROR_DC_NOT_FOUND
);
}
else
WARN
(
"(): GLX_SGI_swap_control extension seems not supported
\n
"
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment