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
Lorenzo Ferrillo
wine
Commits
72e87387
Commit
72e87387
authored
12 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
winex11: Get rid of the glGetIntegerv wrapper.
parent
76ae99a4
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
+1
-41
1 addition, 41 deletions
dlls/winex11.drv/opengl.c
with
1 addition
and
41 deletions
dlls/winex11.drv/opengl.c
+
1
−
41
View file @
72e87387
...
...
@@ -316,11 +316,9 @@ static void (*pglXCopySubBufferMESA)(Display *dpy, GLXDrawable drawable, int x,
/* Standard OpenGL */
static
void
(
*
pglFinish
)(
void
);
static
void
(
*
pglFlush
)(
void
);
static
void
(
*
pglGetIntegerv
)(
GLenum
,
GLint
*
);
static
void
wglFinish
(
void
);
static
void
wglFlush
(
void
);
static
void
wglGetIntegerv
(
GLenum
pname
,
GLint
*
params
);
static
int
GLXErrorHandler
(
Display
*
dpy
,
XErrorEvent
*
event
,
void
*
arg
)
{
...
...
@@ -494,7 +492,6 @@ static BOOL has_opengl(void)
do { p##func = opengl_funcs.gl.p_##func; opengl_funcs.gl.p_##func = w##func; } while(0)
REDIRECT
(
glFinish
);
REDIRECT
(
glFlush
);
REDIRECT
(
glGetIntegerv
);
#undef REDIRECT
pglXGetProcAddressARB
=
wine_dlsym
(
opengl_handle
,
"glXGetProcAddressARB"
,
NULL
,
0
);
...
...
@@ -1730,43 +1727,6 @@ static HDC glxdrv_wglGetCurrentDC( struct wgl_context *ctx )
return
ctx
->
hdc
;
}
/* WGL helper function which handles differences in glGetIntegerv from WGL and GLX */
static
void
wglGetIntegerv
(
GLenum
pname
,
GLint
*
params
)
{
wine_tsx11_lock
();
switch
(
pname
)
{
case
GL_DEPTH_BITS
:
{
struct
wgl_context
*
ctx
=
NtCurrentTeb
()
->
glContext
;
pglGetIntegerv
(
pname
,
params
);
/**
* if we cannot find a Wine Context
* we only have the default wine desktop context,
* so if we have only a 24 depth say we have 32
*/
if
(
!
ctx
&&
*
params
==
24
)
{
*
params
=
32
;
}
TRACE
(
"returns GL_DEPTH_BITS as '%d'
\n
"
,
*
params
);
break
;
}
case
GL_ALPHA_BITS
:
{
struct
wgl_context
*
ctx
=
NtCurrentTeb
()
->
glContext
;
pglXGetFBConfigAttrib
(
gdi_display
,
ctx
->
fmt
->
fbconfig
,
GLX_ALPHA_SIZE
,
params
);
TRACE
(
"returns GL_ALPHA_BITS as '%d'
\n
"
,
*
params
);
break
;
}
default:
pglGetIntegerv
(
pname
,
params
);
break
;
}
wine_tsx11_unlock
();
}
static
void
flush_pixmap
(
struct
wgl_context
*
ctx
)
{
char
buffer
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
...
...
@@ -2735,7 +2695,7 @@ static BOOL X11DRV_wglBindTexImageARB( struct wgl_pbuffer *object, int iBuffer )
TRACE
(
"drawable=%lx, context=%p
\n
"
,
object
->
drawable
,
prev_context
);
tmp_context
=
pglXCreateNewContext
(
gdi_display
,
object
->
fmt
->
fbconfig
,
object
->
fmt
->
render_type
,
prev_context
,
True
);
p
glGetIntegerv
(
object
->
texture_bind_target
,
&
prev_binded_texture
);
opengl_funcs
.
gl
.
p_
glGetIntegerv
(
object
->
texture_bind_target
,
&
prev_binded_texture
);
/* Switch to our pbuffer */
pglXMakeCurrent
(
gdi_display
,
object
->
drawable
,
tmp_context
);
...
...
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