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
fd701957
Commit
fd701957
authored
Sep 26, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Sep 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an x11drv escape that returns a glx drawable.
parent
2c32428b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
0 deletions
+60
-0
bitmap.c
dlls/x11drv/bitmap.c
+1
-0
init.c
dlls/x11drv/init.c
+15
-0
opengl.c
dlls/x11drv/opengl.c
+40
-0
x11drv.h
dlls/x11drv/x11drv.h
+4
-0
No files found.
dlls/x11drv/bitmap.c
View file @
fd701957
...
...
@@ -416,6 +416,7 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap )
if
(
GetObjectW
(
hbitmap
,
sizeof
(
dib
),
&
dib
)
==
sizeof
(
dib
))
X11DRV_DIB_DeleteDIBSection
(
physBitmap
,
&
dib
);
if
(
physBitmap
->
glxpixmap
)
destroy_glxpixmap
(
physBitmap
->
glxpixmap
);
wine_tsx11_lock
();
if
(
physBitmap
->
pixmap
)
XFreePixmap
(
gdi_display
,
physBitmap
->
pixmap
);
XDeleteContext
(
gdi_display
,
(
XID
)
hbitmap
,
bitmap_context
);
...
...
dlls/x11drv/init.c
View file @
fd701957
...
...
@@ -407,6 +407,21 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
return
TRUE
;
}
break
;
case
X11DRV_GET_GLX_DRAWABLE
:
if
(
out_count
>=
sizeof
(
Drawable
))
{
if
(
physDev
->
bitmap
)
{
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
*
(
Drawable
*
)
out_data
=
physDev
->
bitmap
->
glxpixmap
;
}
else
*
(
Drawable
*
)
out_data
=
physDev
->
drawable
;
return
TRUE
;
}
break
;
}
}
break
;
...
...
dlls/x11drv/opengl.c
View file @
fd701957
...
...
@@ -122,6 +122,8 @@ MAKE_FUNCPTR(glXQueryExtension)
MAKE_FUNCPTR
(
glXGetFBConfigs
)
MAKE_FUNCPTR
(
glXChooseFBConfig
)
MAKE_FUNCPTR
(
glXGetFBConfigAttrib
)
MAKE_FUNCPTR
(
glXCreateGLXPixmap
)
MAKE_FUNCPTR
(
glXDestroyGLXPixmap
)
#undef MAKE_FUNCPTR
static
BOOL
has_opengl
(
void
)
...
...
@@ -147,6 +149,8 @@ LOAD_FUNCPTR(glXQueryExtension)
LOAD_FUNCPTR
(
glXGetFBConfigs
)
LOAD_FUNCPTR
(
glXChooseFBConfig
)
LOAD_FUNCPTR
(
glXGetFBConfigAttrib
)
LOAD_FUNCPTR
(
glXCreateGLXPixmap
)
LOAD_FUNCPTR
(
glXDestroyGLXPixmap
)
#undef LOAD_FUNCPTR
wine_tsx11_lock
();
...
...
@@ -499,6 +503,32 @@ XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
return
visual
;
}
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
GLXPixmap
ret
;
XVisualInfo
*
vis
;
XVisualInfo
template
;
int
num
;
wine_tsx11_lock
();
template
.
visualid
=
XVisualIDFromVisual
(
visual
);
vis
=
XGetVisualInfo
(
gdi_display
,
VisualIDMask
,
&
template
,
&
num
);
ret
=
pglXCreateGLXPixmap
(
gdi_display
,
vis
,
physDev
->
bitmap
->
pixmap
);
XFree
(
vis
);
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
)
...
...
@@ -561,4 +591,14 @@ XVisualInfo *X11DRV_setup_opengl_visual( Display *display )
return
NULL
;
}
XID
create_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
return
NULL
;
}
BOOL
destroy_glxpixmap
(
XID
glxpixmap
)
{
return
FALSE
;
}
#endif
/* defined(HAVE_OPENGL) */
dlls/x11drv/x11drv.h
View file @
fd701957
...
...
@@ -99,6 +99,7 @@ typedef struct
{
HBITMAP
hbitmap
;
Pixmap
pixmap
;
XID
glxpixmap
;
int
pixmap_depth
;
/* the following fields are only used for DIB section bitmaps */
int
status
,
p_status
;
/* mapping status */
...
...
@@ -274,6 +275,8 @@ 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
BOOL
destroy_glxpixmap
(
XID
glxpixmap
);
/* XIM support */
extern
XIC
X11DRV_CreateIC
(
XIM
xim
,
Display
*
display
,
Window
win
);
...
...
@@ -479,6 +482,7 @@ enum x11drv_escape_codes
X11DRV_END_EXPOSURES
,
/* end graphics exposures */
X11DRV_GET_DCE
,
/* get the DCE pointer */
X11DRV_SET_DCE
,
/* set the DCE pointer */
X11DRV_GET_GLX_DRAWABLE
/* get current glx drawable for a DC */
};
struct
x11drv_escape_set_drawable
...
...
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