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
fa6598a2
Commit
fa6598a2
authored
Oct 03, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Oct 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Create GLXPixmap for bitmaps in SetPixelFormat.
parent
6cd7d068
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
24 deletions
+35
-24
opengl.c
dlls/winex11.drv/opengl.c
+35
-24
No files found.
dlls/winex11.drv/opengl.c
View file @
fa6598a2
...
...
@@ -984,6 +984,26 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent)
}
static
XID
create_bitmap_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
GLXPixmap
ret
;
XVisualInfo
*
vis
;
XVisualInfo
template
;
int
num
;
wine_tsx11_lock
();
/* Retrieve the visualid from our main visual which is the only visual we can use */
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
;
}
/**
* X11DRV_ChoosePixelFormat
*
...
...
@@ -1440,6 +1460,21 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
physDev
->
gl_drawable
=
X11DRV_get_gl_drawable
(
hwnd
);
}
else
if
(
physDev
->
bitmap
)
{
if
(
!
(
value
&
GLX_PIXMAP_BIT
))
{
WARN
(
"Pixel format %d is not compatible for bitmap rendering
\n
"
,
iPixelFormat
);
return
FALSE
;
}
physDev
->
bitmap
->
glxpixmap
=
create_bitmap_glxpixmap
(
physDev
);
if
(
!
physDev
->
bitmap
->
glxpixmap
)
{
WARN
(
"Couldn't create glxpixmap for pixel format %d
\n
"
,
iPixelFormat
);
return
FALSE
;
}
}
else
{
FIXME
(
"called on a non-window, non-bitmap object?"
);
}
physDev
->
current_pf
=
iPixelFormat
;
...
...
@@ -3202,26 +3237,6 @@ static void X11DRV_WineGL_LoadExtensions(void)
}
static
XID
create_bitmap_glxpixmap
(
X11DRV_PDEVICE
*
physDev
)
{
GLXPixmap
ret
;
XVisualInfo
*
vis
;
XVisualInfo
template
;
int
num
;
wine_tsx11_lock
();
/* Retrieve the visualid from our main visual which is the only visual we can use */
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
;
}
Drawable
get_glxdrawable
(
X11DRV_PDEVICE
*
physDev
)
{
Drawable
ret
;
...
...
@@ -3231,11 +3246,7 @@ Drawable get_glxdrawable(X11DRV_PDEVICE *physDev)
if
(
physDev
->
bitmap
->
hbitmap
==
BITMAP_stock_phys_bitmap
.
hbitmap
)
ret
=
physDev
->
drawable
;
/* PBuffer */
else
{
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_bitmap_glxpixmap
(
physDev
);
ret
=
physDev
->
bitmap
->
glxpixmap
;
}
}
else
if
(
physDev
->
gl_drawable
)
ret
=
physDev
->
gl_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