Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
33143672
Commit
33143672
authored
18 years ago
by
Roderick Colenbrander
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winex11.drv: Opengl init fix.
parent
37df23db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winex11.drv/opengl.c
+45
-0
45 additions, 0 deletions
dlls/winex11.drv/opengl.c
with
45 additions
and
0 deletions
dlls/winex11.drv/opengl.c
+
45
−
0
View file @
33143672
...
...
@@ -1124,6 +1124,11 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
const
PIXELFORMATDESCRIPTOR
*
ppfd
)
{
TRACE
(
"(%p,%d,%p)
\n
"
,
physDev
,
iPixelFormat
,
ppfd
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
/* At the moment we only support the pixelformat corresponding to the main
* x11drv visual which got created at x11drv initialization. More formats
* can be supported if there was a way to recreate x11 windows in x11drv
...
...
@@ -1198,6 +1203,11 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
TRACE
(
"(%p)->(PF:%d)
\n
"
,
hdc
,
hdcPF
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
/* First, get the visual in use by the X11DRV */
if
(
!
gdi_display
)
return
0
;
...
...
@@ -1253,6 +1263,11 @@ BOOL X11DRV_wglDeleteContext(HGLRC hglrc)
TRACE
(
"(%p)
\n
"
,
hglrc
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
wine_tsx11_lock
();
/* A game (Half Life not to name it) deletes twice the same context,
* so make sure it is valid first */
...
...
@@ -1299,6 +1314,11 @@ PROC X11DRV_wglGetProcAddress(LPCSTR lpszProc)
if
(
padding
<
0
)
padding
=
0
;
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
/* Check the table of WGL extensions to see if we need to return a WGL extension
* or a function pointer to a native OpenGL function. */
if
(
strncmp
(
lpszProc
,
"wgl"
,
3
)
!=
0
)
{
...
...
@@ -1329,6 +1349,11 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
TRACE
(
"(%p,%p)
\n
"
,
hdc
,
hglrc
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
wine_tsx11_lock
();
if
(
hglrc
==
NULL
)
{
ret
=
pglXMakeCurrent
(
gdi_display
,
None
,
NULL
);
...
...
@@ -1381,6 +1406,11 @@ BOOL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* hDrawDev, X11DRV_PDEVICE* h
BOOL
ret
;
TRACE
(
"(%p,%p,%p)
\n
"
,
hDrawDev
,
hReadDev
,
hglrc
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
wine_tsx11_lock
();
if
(
hglrc
==
NULL
)
{
ret
=
pglXMakeCurrent
(
gdi_display
,
None
,
NULL
);
...
...
@@ -1414,6 +1444,11 @@ BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
TRACE
(
"(%p, %p)
\n
"
,
org
,
dest
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
if
(
NULL
!=
dest
&&
dest
->
ctx
!=
NULL
)
{
ERR
(
"Could not share display lists, context already created !
\n
"
);
return
FALSE
;
...
...
@@ -1553,6 +1588,11 @@ BOOL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD count
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
physDev
->
hdc
,
first
,
count
,
listBase
,
fid
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
if
(
fid
==
0
)
{
return
internal_wglUseFontBitmaps
(
physDev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineA
);
}
...
...
@@ -1571,6 +1611,11 @@ BOOL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
physDev
->
hdc
,
first
,
count
,
listBase
,
fid
);
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
}
if
(
fid
==
0
)
{
return
internal_wglUseFontBitmaps
(
physDev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineW
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment