Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
f4e8169e
Commit
f4e8169e
authored
Jun 23, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Introduce a function to retrieve the glx drawable and have
both the GET_GLX_DRAWABLE Escape and SwapBuffers call it.
parent
7c6febe6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
46 deletions
+58
-46
init.c
dlls/winex11.drv/init.c
+1
-12
opengl.c
dlls/winex11.drv/opengl.c
+56
-33
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
No files found.
dlls/winex11.drv/init.c
View file @
f4e8169e
...
...
@@ -410,18 +410,7 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
case
X11DRV_GET_GLX_DRAWABLE
:
if
(
out_count
>=
sizeof
(
Drawable
))
{
if
(
physDev
->
bitmap
)
{
if
(
physDev
->
bitmap
->
hbitmap
==
BITMAP_stock_phys_bitmap
.
hbitmap
)
*
(
Drawable
*
)
out_data
=
physDev
->
drawable
;
/* PBuffer */
else
{
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
*
(
Drawable
*
)
out_data
=
physDev
->
bitmap
->
glxpixmap
;
}
}
else
*
(
Drawable
*
)
out_data
=
physDev
->
drawable
;
*
(
Drawable
*
)
out_data
=
get_glxdrawable
(
physDev
);
return
TRUE
;
}
break
;
...
...
dlls/winex11.drv/opengl.c
View file @
f4e8169e
...
...
@@ -523,12 +523,64 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
return
TRUE
;
}
static
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
GLXPixmap
ret
;
XVisualInfo
*
vis
;
XVisualInfo
template
;
int
num
;
GLXFBConfig
*
cfgs
;
wine_tsx11_lock
();
cfgs
=
pglXGetFBConfigs
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
num
);
pglXGetFBConfigAttrib
(
gdi_display
,
cfgs
[
physDev
->
current_pf
-
1
],
GLX_VISUAL_ID
,
(
int
*
)
&
template
.
visualid
);
vis
=
XGetVisualInfo
(
gdi_display
,
VisualIDMask
,
&
template
,
&
num
);
ret
=
pglXCreateGLXPixmap
(
gdi_display
,
vis
,
physDev
->
bitmap
->
pixmap
);
XFree
(
vis
);
XFree
(
cfgs
);
wine_tsx11_unlock
();
TRACE
(
"return %lx
\n
"
,
ret
);
return
ret
;
}
Drawable
get_glxdrawable
(
X11DRV_PDEVICE
*
physDev
)
{
Drawable
ret
;
if
(
physDev
->
bitmap
)
{
if
(
physDev
->
bitmap
->
hbitmap
==
BITMAP_stock_phys_bitmap
.
hbitmap
)
ret
=
physDev
->
drawable
;
/* PBuffer */
else
{
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
ret
=
physDev
->
bitmap
->
glxpixmap
;
}
}
else
ret
=
physDev
->
drawable
;
return
ret
;
}
BOOL
destroy_glxpixmap
(
XID
glxpixmap
)
{
wine_tsx11_lock
();
pglXDestroyGLXPixmap
(
gdi_display
,
glxpixmap
);
wine_tsx11_unlock
();
return
TRUE
;
}
/**
* X11DRV_SwapBuffers
*
* Swap the buffers of this DC
*/
BOOL
X11DRV_SwapBuffers
(
X11DRV_PDEVICE
*
physDev
)
{
BOOL
X11DRV_SwapBuffers
(
X11DRV_PDEVICE
*
physDev
)
{
GLXDrawable
drawable
;
if
(
!
has_opengl
())
{
ERR
(
"No libGL on this box - disabling OpenGL support !
\n
"
);
return
0
;
...
...
@@ -536,8 +588,9 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
TRACE_
(
opengl
)(
"(%p)
\n
"
,
physDev
);
drawable
=
get_glxdrawable
(
physDev
);
wine_tsx11_lock
();
pglXSwapBuffers
(
gdi_display
,
physDev
->
drawable
);
pglXSwapBuffers
(
gdi_display
,
drawable
);
wine_tsx11_unlock
();
return
TRUE
;
...
...
@@ -587,36 +640,6 @@ XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
return
visual
;
}
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
GLXPixmap
ret
;
XVisualInfo
*
vis
;
XVisualInfo
template
;
int
num
;
GLXFBConfig
*
cfgs
;
wine_tsx11_lock
();
cfgs
=
pglXGetFBConfigs
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
num
);
pglXGetFBConfigAttrib
(
gdi_display
,
cfgs
[
physDev
->
current_pf
-
1
],
GLX_VISUAL_ID
,
(
int
*
)
&
template
.
visualid
);
vis
=
XGetVisualInfo
(
gdi_display
,
VisualIDMask
,
&
template
,
&
num
);
ret
=
pglXCreateGLXPixmap
(
gdi_display
,
vis
,
physDev
->
bitmap
->
pixmap
);
XFree
(
vis
);
XFree
(
cfgs
);
wine_tsx11_unlock
();
TRACE
(
"return %lx
\n
"
,
ret
);
return
ret
;
}
BOOL
destroy_glxpixmap
(
XID
glxpixmap
)
{
wine_tsx11_lock
();
pglXDestroyGLXPixmap
(
gdi_display
,
glxpixmap
);
wine_tsx11_unlock
();
return
TRUE
;
}
#else
/* no OpenGL includes */
void
X11DRV_OpenGL_Init
(
Display
*
display
)
...
...
@@ -679,7 +702,7 @@ XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
return
NULL
;
}
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
Drawable
get_glxdrawable
(
X11DRV_PDEVICE
*
physDev
)
{
return
0
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
f4e8169e
...
...
@@ -272,7 +272,7 @@ extern BOOL X11DRV_XRender_ExtTextOut(X11DRV_PDEVICE *physDev, INT x, INT y, UIN
extern
void
X11DRV_XRender_UpdateDrawable
(
X11DRV_PDEVICE
*
physDev
);
extern
XVisualInfo
*
X11DRV_setup_opengl_visual
(
Display
*
display
);
extern
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
);
extern
Drawable
get_glxdrawable
(
X11DRV_PDEVICE
*
physDev
);
extern
BOOL
destroy_glxpixmap
(
XID
glxpixmap
);
/* XIM support */
...
...
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