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
f25cea10
Commit
f25cea10
authored
Aug 23, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Aug 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Fix ATI OpenGL bug.
parent
bc66d7ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
8 deletions
+37
-8
wgl.c
dlls/opengl32/wgl.c
+37
-8
No files found.
dlls/opengl32/wgl.c
View file @
f25cea10
...
...
@@ -1276,21 +1276,50 @@ void internal_glGetIntegerv(GLenum pname, GLint* params) {
static
void
wgl_initialize_glx
(
Display
*
display
,
int
screen
,
glXGetProcAddressARB_t
proc
)
{
const
char
*
server_glx_version
=
glXQueryServerString
(
display
,
screen
,
GLX_VERSION
);
const
char
*
server_glx_extensions
=
glXQueryServerString
(
display
,
screen
,
GLX_EXTENSIONS
);
/*
const
char
*
client_glx_version
=
glXGetClientString
(
display
,
GLX_VERSION
);
const char *client_glx_extensions = glXGetClientString(display, GLX_EXTENSIONS);
const char *glx_extensions = glXQueryExtensionsString(display, screen);
*/
const
char
*
glx_extensions
=
NULL
;
BOOL
glx_direct
=
glXIsDirect
(
display
,
default_cx
);
memset
(
&
wine_glx
,
0
,
sizeof
(
wine_glx
));
if
(
!
strcmp
(
"1.2"
,
server_glx_version
))
{
/* In case of GLX you have direct and indirect rendering. Most of the time direct rendering is used
* as in general only that is hardware accelerated. In some cases like in case of remote X indirect
* rendering is used.
*
* The main problem for our OpenGL code is that we need certain GLX calls but their presence
* depends on the reported GLX client / server version and on the client / server extension list.
* Those don't have to be the same.
*
* In general the server GLX information should be used in case of indirect rendering. When direct
* rendering is used, the OpenGL client library is responsible for which GLX calls are available.
* Nvidia's OpenGL drivers are the best in terms of GLX features. At the moment of writing their
* 8762 drivers support 1.3 for the server and 1.4 for the client and they support lots of extensions.
* Unfortunately it is much more complicated for Mesa/DRI-based drivers and ATI's drivers.
* Both sets of drivers report a server version of 1.2 and the client version can be 1.3 or 1.4.
* Further in case of atleast ATI's drivers one crucial extension needed for our pixel format code
* is only available in the list of server extensions and not in the client list.
*
* The versioning checks below try to take into account the comments from above.
*/
/* Based on the default opengl context we decide whether direct or indirect rendering is used.
* In case of indirect rendering we check if the GLX version of the server is 1.2 and else
* the client version is checked.
*/
if
(
(
!
glx_direct
&&
!
strcmp
(
"1.2"
,
server_glx_version
))
||
(
glx_direct
&&
!
strcmp
(
"1.2"
,
client_glx_version
))
)
{
wine_glx
.
version
=
2
;
}
else
{
wine_glx
.
version
=
3
;
}
/* Depending on the use of direct or indirect rendering we need either the list of extensions
* exported by the client or by the server.
*/
if
(
glx_direct
)
glx_extensions
=
glXGetClientString
(
display
,
GLX_EXTENSIONS
);
else
glx_extensions
=
glXQueryServerString
(
display
,
screen
,
GLX_EXTENSIONS
);
if
(
2
<
wine_glx
.
version
)
{
wine_glx
.
p_glXChooseFBConfig
=
proc
(
(
const
GLubyte
*
)
"glXChooseFBConfig"
);
wine_glx
.
p_glXGetFBConfigAttrib
=
proc
(
(
const
GLubyte
*
)
"glXGetFBConfigAttrib"
);
...
...
@@ -1299,12 +1328,12 @@ static void wgl_initialize_glx(Display *display, int screen, glXGetProcAddressAR
/*wine_glx.p_glXGetFBConfigs = proc( (const GLubyte *) "glXGetFBConfigs");*/
wine_glx
.
p_glXQueryDrawable
=
proc
(
(
const
GLubyte
*
)
"glXQueryDrawable"
);
}
else
{
if
(
NULL
!=
strstr
(
server_
glx_extensions
,
"GLX_SGIX_fbconfig"
))
{
if
(
NULL
!=
strstr
(
glx_extensions
,
"GLX_SGIX_fbconfig"
))
{
wine_glx
.
p_glXChooseFBConfig
=
proc
(
(
const
GLubyte
*
)
"glXChooseFBConfigSGIX"
);
wine_glx
.
p_glXGetFBConfigAttrib
=
proc
(
(
const
GLubyte
*
)
"glXGetFBConfigAttribSGIX"
);
wine_glx
.
p_glXGetVisualFromFBConfig
=
proc
(
(
const
GLubyte
*
)
"glXGetVisualFromFBConfigSGIX"
);
}
else
{
ERR
(
" glx_version as %s and GLX_SGIX_fbconfig extension is unsupported. Expect problems.
\n
"
,
server
_glx_version
);
ERR
(
" glx_version as %s and GLX_SGIX_fbconfig extension is unsupported. Expect problems.
\n
"
,
client
_glx_version
);
}
}
/** try anyway to retrieve that calls, maybe they works using glx client tricks */
...
...
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