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
12880784
Commit
12880784
authored
Dec 27, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Dec 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle the swapchain presentation interval with wglSwapIntervalEXT.
parent
a7346e9f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
context.c
dlls/wined3d/context.c
+31
-0
directx.c
dlls/wined3d/directx.c
+4
-0
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+5
-1
No files found.
dlls/wined3d/context.c
View file @
12880784
...
...
@@ -1280,6 +1280,7 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain,
int
numSamples
=
0
;
int
pixel_format
;
unsigned
int
s
;
int
swap_interval
;
DWORD
state
;
HGLRC
ctx
;
HDC
hdc
;
...
...
@@ -1460,6 +1461,36 @@ struct wined3d_context *context_create(IWineD3DSwapChainImpl *swapchain,
goto
out
;
}
switch
(
swapchain
->
presentParms
.
PresentationInterval
)
{
case
WINED3DPRESENT_INTERVAL_IMMEDIATE
:
swap_interval
=
0
;
break
;
case
WINED3DPRESENT_INTERVAL_DEFAULT
:
case
WINED3DPRESENT_INTERVAL_ONE
:
swap_interval
=
1
;
break
;
case
WINED3DPRESENT_INTERVAL_TWO
:
swap_interval
=
2
;
break
;
case
WINED3DPRESENT_INTERVAL_THREE
:
swap_interval
=
3
;
break
;
case
WINED3DPRESENT_INTERVAL_FOUR
:
swap_interval
=
4
;
break
;
default:
FIXME
(
"Unknown presentation interval %08x
\n
"
,
swapchain
->
presentParms
.
PresentationInterval
);
swap_interval
=
1
;
}
if
(
gl_info
->
supported
[
WGL_EXT_SWAP_CONTROL
])
{
if
(
!
GL_EXTCALL
(
wglSwapIntervalEXT
(
swap_interval
)))
ERR
(
"wglSwapIntervalEXT failed to set swap interval %d for context %p, last error %#x
\n
"
,
swap_interval
,
ret
,
GetLastError
());
}
ENTER_GL
();
glGetIntegerv
(
GL_AUX_BUFFERS
,
&
ret
->
aux_buffers
);
...
...
dlls/wined3d/directx.c
View file @
12880784
...
...
@@ -2572,6 +2572,10 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
gl_info
->
supported
[
WGL_ARB_PIXEL_FORMAT
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_ARB_pixel_format support
\n
"
);
}
if
(
!
strcmp
(
ThisExtn
,
"WGL_EXT_swap_control"
))
{
gl_info
->
supported
[
WGL_EXT_SWAP_CONTROL
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_EXT_swap_control support
\n
"
);
}
if
(
!
strcmp
(
ThisExtn
,
"WGL_WINE_pixel_format_passthrough"
))
{
gl_info
->
supported
[
WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_WINE_pixel_format_passthrough support
\n
"
);
...
...
dlls/wined3d/wined3d_gl.h
View file @
12880784
...
...
@@ -1836,6 +1836,7 @@ typedef enum wined3d_gl_extension
SGIS_GENERATE_MIPMAP
,
/* WGL extensions */
WGL_ARB_PIXEL_FORMAT
,
WGL_EXT_SWAP_CONTROL
,
WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
,
/* Internally used */
WINED3D_GL_NORMALIZED_TEXRECT
,
...
...
@@ -3796,6 +3797,8 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC hdc, const int
typedef
BOOL
(
WINAPI
*
WINED3D_PFNWGLSETPIXELFORMATWINE
)(
HDC
hdc
,
int
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
);
typedef
BOOL
(
WINAPI
*
WINED3D_PFNWGLSWAPINTERVALEXTPROC
)(
int
interval
);
#define GL_EXT_FUNCS_GEN \
/* GL_APPLE_fence */
\
USE_GL_FUNC(PGLFNGENFENCESAPPLEPROC, \
...
...
@@ -4531,6 +4534,7 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma
USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB, 0, NULL) \
USE_GL_FUNC(WINED3D_PFNWGLGETPIXELFORMATATTRIBFVARBPROC, wglGetPixelFormatAttribfvARB, 0, NULL) \
USE_GL_FUNC(WINED3D_PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB, 0, NULL) \
USE_GL_FUNC(WINED3D_PFNWGLSETPIXELFORMATWINE, wglSetPixelFormatWINE, 0, NULL)
USE_GL_FUNC(WINED3D_PFNWGLSETPIXELFORMATWINE, wglSetPixelFormatWINE, 0, NULL) \
USE_GL_FUNC(WINED3D_PFNWGLSWAPINTERVALEXTPROC, wglSwapIntervalEXT, 0, NULL)
#endif
/* __WINE_WINED3D_GL */
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