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
33143672
Commit
33143672
authored
Nov 02, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Nov 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Opengl init fix.
parent
37df23db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
opengl.c
dlls/winex11.drv/opengl.c
+45
-0
No files found.
dlls/winex11.drv/opengl.c
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
);
}
...
...
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