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
b4e36747
Commit
b4e36747
authored
Sep 07, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Get the information from the drawable structure in SwapBuffers.
parent
0e9c9772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
opengl.c
dlls/winex11.drv/opengl.c
+30
-29
No files found.
dlls/winex11.drv/opengl.c
View file @
b4e36747
...
...
@@ -3028,7 +3028,9 @@ static void X11DRV_WineGL_LoadExtensions(void)
*/
static
BOOL
glxdrv_SwapBuffers
(
PHYSDEV
dev
)
{
struct
glx_physdev
*
physdev
=
get_glxdrv_dev
(
dev
);
enum
x11drv_escape_codes
code
=
X11DRV_FLUSH_GL_DRAWABLE
;
struct
gl_drawable
*
gl
;
HWND
hwnd
;
struct
wgl_context
*
ctx
=
NtCurrentTeb
()
->
glContext
;
TRACE
(
"(%p)
\n
"
,
dev
->
hdc
);
...
...
@@ -3040,36 +3042,35 @@ static BOOL glxdrv_SwapBuffers(PHYSDEV dev)
return
FALSE
;
}
if
(
!
physdev
->
drawable
)
{
WARN
(
"Using an invalid drawable, skipping
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
sync_context
(
ctx
);
switch
(
physdev
->
type
)
{
case
DC_GL_PIXMAP_WIN
:
if
(
pglXCopySubBufferMESA
)
{
int
w
=
physdev
->
x11dev
->
dc_rect
.
right
-
physdev
->
x11dev
->
dc_rect
.
left
;
int
h
=
physdev
->
x11dev
->
dc_rect
.
bottom
-
physdev
->
x11dev
->
dc_rect
.
top
;
/* (glX)SwapBuffers has an implicit glFlush effect, however
* GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before
* copying */
pglFlush
();
if
(
w
>
0
&&
h
>
0
)
pglXCopySubBufferMESA
(
gdi_display
,
physdev
->
drawable
,
0
,
0
,
w
,
h
);
break
;
}
/* fall through */
default:
pglXSwapBuffers
(
gdi_display
,
physdev
->
drawable
);
break
;
}
flush_gl_drawable
(
physdev
);
hwnd
=
WindowFromDC
(
dev
->
hdc
);
EnterCriticalSection
(
&
context_section
);
if
(
!
XFindContext
(
gdi_display
,
(
XID
)
hwnd
,
gl_hwnd_context
,
(
char
**
)
&
gl
)
||
!
XFindContext
(
gdi_display
,
(
XID
)
dev
->
hdc
,
gl_pbuffer_context
,
(
char
**
)
&
gl
))
{
switch
(
gl
->
type
)
{
case
DC_GL_PIXMAP_WIN
:
if
(
pglXCopySubBufferMESA
)
{
/* (glX)SwapBuffers has an implicit glFlush effect, however
* GLX_MESA_copy_sub_buffer doesn't. Make sure GL is flushed before
* copying */
pglFlush
();
pglXCopySubBufferMESA
(
gdi_display
,
gl
->
drawable
,
0
,
0
,
gl
->
rect
.
right
-
gl
->
rect
.
left
,
gl
->
rect
.
bottom
-
gl
->
rect
.
top
);
break
;
}
/* fall through */
default:
pglXSwapBuffers
(
gdi_display
,
gl
->
drawable
);
break
;
}
}
LeaveCriticalSection
(
&
context_section
);
ExtEscape
(
dev
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
0
,
NULL
);
/* FPS support */
if
(
TRACE_ON
(
fps
))
...
...
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