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
3f807e7a
Commit
3f807e7a
authored
Mar 06, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Implement WGL_EXT_swap_control.
parent
9c29be68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
opengl.c
dlls/winemac.drv/opengl.c
+65
-0
No files found.
dlls/winemac.drv/opengl.c
View file @
3f807e7a
...
...
@@ -2327,6 +2327,31 @@ static BOOL macdrv_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int i
}
/**********************************************************************
* macdrv_wglGetSwapIntervalEXT
*
* WGL_EXT_swap_control: wglGetSwapIntervalEXT
*/
static
int
macdrv_wglGetSwapIntervalEXT
(
void
)
{
struct
wgl_context
*
context
=
NtCurrentTeb
()
->
glContext
;
long
value
;
CGLError
err
;
TRACE
(
"
\n
"
);
err
=
CGLGetParameter
(
context
->
cglcontext
,
kCGLCPSwapInterval
,
(
GLint
*
)
&
value
);
if
(
err
!=
kCGLNoError
)
{
WARN
(
"CGLGetParameter(kCGLCPSwapInterval) failed; error %d %s
\n
"
,
err
,
CGLErrorString
(
err
));
value
=
1
;
}
return
value
;
}
/***********************************************************************
* macdrv_wglMakeContextCurrentARB
*
...
...
@@ -2686,6 +2711,42 @@ static BOOL macdrv_wglSetPixelFormatWINE(HDC hdc, int fmt)
}
/**********************************************************************
* macdrv_wglSwapIntervalEXT
*
* WGL_EXT_swap_control: wglSwapIntervalEXT
*/
static
BOOL
macdrv_wglSwapIntervalEXT
(
int
interval
)
{
struct
wgl_context
*
context
=
NtCurrentTeb
()
->
glContext
;
long
value
;
CGLError
err
;
TRACE
(
"interval %d
\n
"
,
interval
);
if
(
interval
<
0
)
{
SetLastError
(
ERROR_INVALID_DATA
);
return
FALSE
;
}
if
(
interval
>
1
)
interval
=
1
;
value
=
interval
;
err
=
CGLSetParameter
(
context
->
cglcontext
,
kCGLCPSwapInterval
,
(
GLint
*
)
&
value
);
if
(
err
!=
kCGLNoError
)
{
WARN
(
"CGLSetParameter(kCGLCPSwapInterval) failed; error %d %s
\n
"
,
err
,
CGLErrorString
(
err
));
SetLastError
(
ERROR_GEN_FAILURE
);
return
FALSE
;
}
return
TRUE
;
}
static
void
register_extension
(
const
char
*
ext
)
{
if
(
gl_info
.
wglExtensions
[
0
])
...
...
@@ -2754,6 +2815,10 @@ static void load_extensions(void)
register_extension
(
"WGL_EXT_extensions_string"
);
opengl_funcs
.
ext
.
p_wglGetExtensionsStringEXT
=
macdrv_wglGetExtensionsStringEXT
;
register_extension
(
"WGL_EXT_swap_control"
);
opengl_funcs
.
ext
.
p_wglSwapIntervalEXT
=
macdrv_wglSwapIntervalEXT
;
opengl_funcs
.
ext
.
p_wglGetSwapIntervalEXT
=
macdrv_wglGetSwapIntervalEXT
;
/* Presumably identical to [W]GL_ARB_framebuffer_sRGB, above, but clients may
check for either, so register them separately. */
if
(
gluCheckExtension
((
GLubyte
*
)
"GL_EXT_framebuffer_sRGB"
,
(
GLubyte
*
)
gl_info
.
glExtensions
))
...
...
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