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
72e87387
Commit
72e87387
authored
Jul 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Get rid of the glGetIntegerv wrapper.
parent
76ae99a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
41 deletions
+1
-41
opengl.c
dlls/winex11.drv/opengl.c
+1
-41
No files found.
dlls/winex11.drv/opengl.c
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
);
...
...
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