Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1d4effca
Commit
1d4effca
authored
Nov 04, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Fix WoW screen flickering.
parent
4c4094e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
8 deletions
+53
-8
driver.c
dlls/gdi32/driver.c
+1
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
opengl.c
dlls/gdi32/opengl.c
+29
-0
opengl.c
dlls/winex11.drv/opengl.c
+21
-8
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-0
No files found.
dlls/gdi32/driver.c
View file @
1d4effca
...
...
@@ -199,6 +199,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
wglCreateContext
);
GET_FUNC
(
wglDeleteContext
);
GET_FUNC
(
wglGetProcAddress
);
GET_FUNC
(
wglGetPbufferDCARB
);
GET_FUNC
(
wglMakeContextCurrentARB
);
GET_FUNC
(
wglMakeCurrent
);
GET_FUNC
(
wglShareLists
);
...
...
dlls/gdi32/gdi_private.h
View file @
1d4effca
...
...
@@ -187,6 +187,7 @@ typedef struct tagDC_FUNCS
HGLRC
(
*
pwglCreateContext
)(
PHYSDEV
);
BOOL
(
*
pwglDeleteContext
)(
HGLRC
);
PROC
(
*
pwglGetProcAddress
)(
LPCSTR
);
HDC
(
*
pwglGetPbufferDCARB
)(
PHYSDEV
,
void
*
);
BOOL
(
*
pwglMakeCurrent
)(
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglMakeContextCurrentARB
)(
PHYSDEV
,
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglShareLists
)(
HGLRC
hglrc1
,
HGLRC
hglrc2
);
...
...
dlls/gdi32/opengl.c
View file @
1d4effca
...
...
@@ -131,6 +131,33 @@ HDC WINAPI wglGetCurrentDC(void)
}
/***********************************************************************
* wglGetPbufferDCARB
*/
static
HDC
WINAPI
wglGetPbufferDCARB
(
void
*
pbuffer
)
{
HDC
ret
=
0
;
/* Create a device context to associate with the pbuffer */
HDC
hdc
=
CreateDCA
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
TRACE
(
"(%p)
\n
"
,
pbuffer
);
if
(
!
dc
)
return
FALSE
;
/* The display driver has to do the rest of the work because
* we need access to lowlevel datatypes which we can't access here
*/
if
(
!
dc
->
funcs
->
pwglGetPbufferDCARB
)
FIXME
(
" :stub
\n
"
);
else
ret
=
dc
->
funcs
->
pwglGetPbufferDCARB
(
dc
->
physDev
,
pbuffer
);
TRACE
(
"(%p), hdc=%p
\n
"
,
pbuffer
,
ret
);
GDI_ReleaseObj
(
hdc
);
return
ret
;
}
/***********************************************************************
* wglMakeCurrent (OPENGL32.@)
*/
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
...
...
@@ -281,6 +308,8 @@ PROC WINAPI wglGetProcAddress(LPCSTR func)
*/
if
(
ret
&&
strcmp
(
func
,
"wglMakeContextCurrentARB"
)
==
0
)
return
wglMakeContextCurrentARB
;
else
if
(
ret
&&
strcmp
(
func
,
"wglGetPbufferDCARB"
)
==
0
)
return
(
PROC
)
wglGetPbufferDCARB
;
return
ret
;
}
dlls/winex11.drv/opengl.c
View file @
1d4effca
...
...
@@ -1871,23 +1871,26 @@ static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer)
return
GL_TRUE
;
}
/* WGL_ARB_pbuffer: wglGetPbufferDCARB */
static
HDC
WINAPI
X11DRV_wglGetPbufferDCARB
(
HPBUFFERARB
hPbuffer
)
/* WGL_ARB_pbuffer: wglGetPbufferDCARB
* The function wglGetPbufferDCARB returns a device context for a pbuffer.
* Gdi32 implements the part of this function which creates a device context.
* This part associates the physDev with the X drawable of the pbuffer.
*/
HDC
X11DRV_wglGetPbufferDCARB
(
X11DRV_PDEVICE
*
physDev
,
HPBUFFERARB
hPbuffer
)
{
Wine_GLPBuffer
*
object
=
(
Wine_GLPBuffer
*
)
hPbuffer
;
HDC
hDC
;
if
(
NULL
==
object
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
NULL
;
}
hDC
=
CreateCompatibleDC
(
object
->
hdc
);
/* The function wglGetPbufferDCARB returns a DC to which the pbuffer can be connected.
* We only support one onscreen rendering format (the one from the main visual), so use that. */
SetPixelFormat
(
hDC
,
1
,
NULL
);
set_drawable
(
hDC
,
object
->
drawable
);
/* works ?? */
TRACE
(
"(%p)->(%p)
\n
"
,
hPbuffer
,
hDC
);
return
hDC
;
physDev
->
current_pf
=
1
;
physDev
->
drawable
=
object
->
drawable
;
TRACE
(
"(%p)->(%p)
\n
"
,
hPbuffer
,
physDev
->
hdc
);
return
physDev
->
hdc
;
}
/* WGL_ARB_pbuffer: wglQueryPbufferARB */
...
...
@@ -2379,6 +2382,9 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf
SetLastError
(
ERROR_INVALID_HANDLE
);
return
GL_FALSE
;
}
/* Disable WGL_ARB_render_texture support untill it is implemented properly
* using pbuffers or FBOs */
#if 0
if (!use_render_texture_ati && 1 == use_render_texture_emulation) {
int do_init = 0;
GLint prev_binded_tex;
...
...
@@ -2406,6 +2412,7 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf
object->texture = prev_binded_tex;
return GL_TRUE;
}
#endif
if
(
NULL
!=
pglXBindTexImageARB
)
{
return
pglXBindTexImageARB
(
object
->
display
,
object
->
drawable
,
iBuffer
);
}
...
...
@@ -2834,6 +2841,12 @@ PROC X11DRV_wglGetProcAddress(LPCSTR lpszProc) {
return
NULL
;
}
HDC
X11DRV_wglGetPbufferDCARB
(
X11DRV_PDEVICE
*
hDevice
,
HPBUFFERARB
hPbuffer
)
{
ERR_
(
opengl
)(
"No OpenGL support compiled in.
\n
"
);
return
NULL
;
}
BOOL
X11DRV_wglMakeContextCurrentARB
(
X11DRV_PDEVICE
*
hDrawDev
,
X11DRV_PDEVICE
*
hReadDev
,
HGLRC
hglrc
)
{
ERR_
(
opengl
)(
"No OpenGL support compiled in.
\n
"
);
return
FALSE
;
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
1d4effca
...
...
@@ -134,6 +134,7 @@
@ cdecl wglCreateContext(ptr) X11DRV_wglCreateContext
@ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext
@ cdecl wglGetProcAddress(str) X11DRV_wglGetProcAddress
@ cdecl wglGetPbufferDCARB(ptr ptr) X11DRV_wglGetPbufferDCARB
@ cdecl wglMakeContextCurrentARB(ptr ptr long) X11DRV_wglMakeContextCurrentARB
@ cdecl wglMakeCurrent(ptr long) X11DRV_wglMakeCurrent
@ cdecl wglShareLists(long long) X11DRV_wglShareLists
...
...
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