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
412cb77d
Commit
412cb77d
authored
Dec 19, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl: Add support for rendering on bitmaps.
parent
dbc14a5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
wgl.c
dlls/opengl32/wgl.c
+16
-8
init.c
dlls/x11drv/init.c
+1
-0
opengl.c
dlls/x11drv/opengl.c
+0
-6
No files found.
dlls/opengl32/wgl.c
View file @
412cb77d
...
@@ -43,10 +43,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(opengl);
...
@@ -43,10 +43,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(opengl);
#define X11DRV_ESCAPE 6789
#define X11DRV_ESCAPE 6789
enum
x11drv_escape_codes
enum
x11drv_escape_codes
{
{
X11DRV_GET_DISPLAY
,
/* get X11 display for a DC */
X11DRV_GET_DISPLAY
,
/* get X11 display for a DC */
X11DRV_GET_DRAWABLE
,
/* get current drawable for a DC */
X11DRV_GET_DRAWABLE
,
/* get current drawable for a DC */
X11DRV_GET_FONT
,
/* get current X font for a DC */
X11DRV_GET_FONT
,
/* get current X font for a DC */
X11DRV_SET_DRAWABLE
,
/* set current drawable for a DC */
X11DRV_SET_DRAWABLE
,
/* set current drawable for a DC */
X11DRV_START_EXPOSURES
,
/* start graphics exposures */
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 */
};
};
void
(
*
wine_tsx11_lock_ptr
)(
void
)
=
NULL
;
void
(
*
wine_tsx11_lock_ptr
)(
void
)
=
NULL
;
...
@@ -121,11 +126,11 @@ inline static Display *get_display( HDC hdc )
...
@@ -121,11 +126,11 @@ inline static Display *get_display( HDC hdc )
}
}
/* retrieve the X drawable to use on a given DC */
/* retrieve the
GL
X drawable to use on a given DC */
inline
static
Drawable
get_drawable
(
HDC
hdc
)
inline
static
Drawable
get_drawable
(
HDC
hdc
)
{
{
Drawable
drawable
;
GLX
Drawable
drawable
;
enum
x11drv_escape_codes
escape
=
X11DRV_GET_DRAWABLE
;
enum
x11drv_escape_codes
escape
=
X11DRV_GET_
GLX_
DRAWABLE
;
if
(
!
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
if
(
!
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
sizeof
(
drawable
),
(
LPSTR
)
&
drawable
))
drawable
=
0
;
sizeof
(
drawable
),
(
LPSTR
)
&
drawable
))
drawable
=
0
;
...
@@ -144,7 +149,7 @@ inline static HDC get_hdc_from_Drawable(GLXDrawable d)
...
@@ -144,7 +149,7 @@ inline static HDC get_hdc_from_Drawable(GLXDrawable d)
return
NULL
;
return
NULL
;
}
}
/* retrieve the X
drawable
to use on a given DC */
/* retrieve the X
font
to use on a given DC */
inline
static
Font
get_font
(
HDC
hdc
)
inline
static
Font
get_font
(
HDC
hdc
)
{
{
Font
font
;
Font
font
;
...
@@ -469,6 +474,7 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
...
@@ -469,6 +474,7 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
{
HGLRC
hglrc
)
{
BOOL
ret
;
BOOL
ret
;
DWORD
type
=
GetObjectType
(
hdc
);
TRACE
(
"(%p,%p)
\n
"
,
hdc
,
hglrc
);
TRACE
(
"(%p,%p)
\n
"
,
hdc
,
hglrc
);
...
@@ -523,6 +529,8 @@ BOOL WINAPI wglMakeCurrent(HDC hdc,
...
@@ -523,6 +529,8 @@ BOOL WINAPI wglMakeCurrent(HDC hdc,
}
}
TRACE
(
" make current for dis %p, drawable %p, ctx %p
\n
"
,
ctx
->
display
,
(
void
*
)
drawable
,
ctx
->
ctx
);
TRACE
(
" make current for dis %p, drawable %p, ctx %p
\n
"
,
ctx
->
display
,
(
void
*
)
drawable
,
ctx
->
ctx
);
ret
=
glXMakeCurrent
(
ctx
->
display
,
drawable
,
ctx
->
ctx
);
ret
=
glXMakeCurrent
(
ctx
->
display
,
drawable
,
ctx
->
ctx
);
if
(
ret
&&
type
==
OBJ_MEMDC
)
glDrawBuffer
(
GL_FRONT_LEFT
);
}
}
LEAVE_GL
();
LEAVE_GL
();
TRACE
(
" returning %s
\n
"
,
(
ret
?
"True"
:
"False"
));
TRACE
(
" returning %s
\n
"
,
(
ret
?
"True"
:
"False"
));
...
...
dlls/x11drv/init.c
View file @
412cb77d
...
@@ -415,6 +415,7 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
...
@@ -415,6 +415,7 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
if
(
!
physDev
->
bitmap
->
glxpixmap
)
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
X11DRV_CoerceDIBSection
(
physDev
,
DIB_Status_GdiMod
,
FALSE
);
*
(
Drawable
*
)
out_data
=
physDev
->
bitmap
->
glxpixmap
;
*
(
Drawable
*
)
out_data
=
physDev
->
bitmap
->
glxpixmap
;
}
}
else
else
...
...
dlls/x11drv/opengl.c
View file @
412cb77d
...
@@ -199,12 +199,6 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
...
@@ -199,12 +199,6 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
dump_PIXELFORMATDESCRIPTOR
((
const
PIXELFORMATDESCRIPTOR
*
)
ppfd
);
dump_PIXELFORMATDESCRIPTOR
((
const
PIXELFORMATDESCRIPTOR
*
)
ppfd
);
}
}
if
(
ppfd
->
dwFlags
&
PFD_DRAW_TO_BITMAP
)
{
ERR
(
"Flag not supported !
\n
"
);
/* Should SetError here... */
return
0
;
}
/* Now, build the request to GLX */
/* Now, build the request to GLX */
if
(
ppfd
->
iPixelType
==
PFD_TYPE_COLORINDEX
)
{
if
(
ppfd
->
iPixelType
==
PFD_TYPE_COLORINDEX
)
{
...
...
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