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
13268261
Commit
13268261
authored
Feb 02, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Feb 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl: Sync a dibsection to its pixmap before drawing to it via opengl.
parent
a4889012
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
5 deletions
+33
-5
opengl_ext.h
dlls/opengl32/opengl_ext.h
+2
-1
wgl.c
dlls/opengl32/wgl.c
+21
-1
init.c
dlls/x11drv/init.c
+8
-2
x11drv.h
dlls/x11drv/x11drv.h
+2
-1
No files found.
dlls/opengl32/opengl_ext.h
View file @
13268261
...
...
@@ -58,7 +58,8 @@ extern void (*wine_tsx11_lock_ptr)(void);
extern
void
(
*
wine_tsx11_unlock_ptr
)(
void
);
/* As GLX relies on X, this is needed */
#define ENTER_GL() wine_tsx11_lock_ptr()
void
enter_gl
(
void
);
#define ENTER_GL() enter_gl()
#define LEAVE_GL() wine_tsx11_unlock_ptr()
...
...
dlls/opengl32/wgl.c
View file @
13268261
...
...
@@ -54,7 +54,8 @@ 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 */
X11DRV_GET_GLX_DRAWABLE
,
/* get current glx drawable for a DC */
X11DRV_SYNC_PIXMAP
/* sync the dibsection to its pixmap */
};
void
(
*
wine_tsx11_lock_ptr
)(
void
)
=
NULL
;
...
...
@@ -88,6 +89,25 @@ static inline Wine_GLContext *get_context_from_GLXContext(GLXContext ctx)
return
ret
;
}
void
enter_gl
(
void
)
{
GLXContext
gl_ctx
;
Wine_GLContext
*
ctx
;
enum
x11drv_escape_codes
escape
=
X11DRV_SYNC_PIXMAP
;
wine_tsx11_lock_ptr
();
gl_ctx
=
glXGetCurrentContext
();
if
(
!
gl_ctx
)
return
;
ctx
=
get_context_from_GLXContext
(
gl_ctx
);
wine_tsx11_unlock_ptr
();
/* unlock before calling GDI apis */
if
(
ctx
&&
GetObjectType
(
ctx
->
hdc
)
==
OBJ_MEMDC
)
ExtEscape
(
ctx
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
0
,
NULL
);
wine_tsx11_lock_ptr
();
return
;
}
static
inline
void
free_context
(
Wine_GLContext
*
context
)
{
if
(
context
->
next
!=
NULL
)
context
->
next
->
prev
=
context
->
prev
;
...
...
dlls/x11drv/init.c
View file @
13268261
...
...
@@ -414,8 +414,6 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
{
if
(
!
physDev
->
bitmap
->
glxpixmap
)
physDev
->
bitmap
->
glxpixmap
=
create_glxpixmap
(
physDev
);
X11DRV_CoerceDIBSection
(
physDev
,
DIB_Status_GdiMod
,
FALSE
);
*
(
Drawable
*
)
out_data
=
physDev
->
bitmap
->
glxpixmap
;
}
else
...
...
@@ -423,6 +421,14 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
return
TRUE
;
}
break
;
case
X11DRV_SYNC_PIXMAP
:
if
(
physDev
->
bitmap
)
{
X11DRV_CoerceDIBSection
(
physDev
,
DIB_Status_GdiMod
,
FALSE
);
return
TRUE
;
}
return
FALSE
;
break
;
}
}
break
;
...
...
dlls/x11drv/x11drv.h
View file @
13268261
...
...
@@ -480,7 +480,8 @@ 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 */
X11DRV_GET_GLX_DRAWABLE
,
/* get current glx drawable for a DC */
X11DRV_SYNC_PIXMAP
/* sync the dibsection to its pixmap */
};
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