mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
opengl32: Get rid of the DIB section sync support.
This commit is contained in:
parent
fecb1d8b6f
commit
b88b6b74f0
4 changed files with 3 additions and 51 deletions
|
@ -42,8 +42,7 @@ extern void (*wine_tsx11_lock_ptr)(void);
|
||||||
extern void (*wine_tsx11_unlock_ptr)(void);
|
extern void (*wine_tsx11_unlock_ptr)(void);
|
||||||
|
|
||||||
/* As GLX relies on X, this is needed */
|
/* As GLX relies on X, this is needed */
|
||||||
void enter_gl(void);
|
#define ENTER_GL() wine_tsx11_lock_ptr()
|
||||||
#define ENTER_GL() enter_gl()
|
|
||||||
#define LEAVE_GL() wine_tsx11_unlock_ptr()
|
#define LEAVE_GL() wine_tsx11_unlock_ptr()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,22 +81,6 @@ MAKE_FUNCPTR(gluTessVertex)
|
||||||
#undef MAKE_FUNCPTR
|
#undef MAKE_FUNCPTR
|
||||||
#endif /* SONAME_LIBGLU */
|
#endif /* SONAME_LIBGLU */
|
||||||
|
|
||||||
/* x11drv GDI escapes */
|
|
||||||
#define X11DRV_ESCAPE 6789
|
|
||||||
enum x11drv_escape_codes
|
|
||||||
{
|
|
||||||
X11DRV_GET_DISPLAY, /* get X11 display for a DC */
|
|
||||||
X11DRV_GET_DRAWABLE, /* get current drawable for a DC */
|
|
||||||
X11DRV_GET_FONT, /* get current X font 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 */
|
|
||||||
X11DRV_SYNC_PIXMAP /* sync the dibsection to its pixmap */
|
|
||||||
};
|
|
||||||
|
|
||||||
void (*wine_tsx11_lock_ptr)(void) = NULL;
|
void (*wine_tsx11_lock_ptr)(void) = NULL;
|
||||||
void (*wine_tsx11_unlock_ptr)(void) = NULL;
|
void (*wine_tsx11_unlock_ptr)(void) = NULL;
|
||||||
|
|
||||||
|
@ -106,26 +90,6 @@ static void* libglu_handle = NULL;
|
||||||
static char* internal_gl_disabled_extensions = NULL;
|
static char* internal_gl_disabled_extensions = NULL;
|
||||||
static char* internal_gl_extensions = NULL;
|
static char* internal_gl_extensions = NULL;
|
||||||
|
|
||||||
typedef struct wine_glcontext {
|
|
||||||
HDC hdc;
|
|
||||||
BOOL do_escape;
|
|
||||||
/* ... more stuff here */
|
|
||||||
} Wine_GLContext;
|
|
||||||
|
|
||||||
void enter_gl(void)
|
|
||||||
{
|
|
||||||
Wine_GLContext *curctx = NtCurrentTeb()->glContext;
|
|
||||||
|
|
||||||
if (curctx && curctx->do_escape)
|
|
||||||
{
|
|
||||||
enum x11drv_escape_codes escape = X11DRV_SYNC_PIXMAP;
|
|
||||||
ExtEscape(curctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
wine_tsx11_lock_ptr();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const GLubyte * WINAPI wine_glGetString( GLenum name );
|
const GLubyte * WINAPI wine_glGetString( GLenum name );
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -429,6 +429,7 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
|
||||||
break;
|
break;
|
||||||
case X11DRV_GET_DCE:
|
case X11DRV_GET_DCE:
|
||||||
case X11DRV_SET_DCE:
|
case X11DRV_SET_DCE:
|
||||||
|
case X11DRV_SYNC_PIXMAP:
|
||||||
FIXME( "%x escape no longer supported\n", *(const enum x11drv_escape_codes *)in_data );
|
FIXME( "%x escape no longer supported\n", *(const enum x11drv_escape_codes *)in_data );
|
||||||
break;
|
break;
|
||||||
case X11DRV_GET_GLX_DRAWABLE:
|
case X11DRV_GET_GLX_DRAWABLE:
|
||||||
|
@ -438,13 +439,6 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case X11DRV_SYNC_PIXMAP:
|
|
||||||
if(physDev->bitmap)
|
|
||||||
{
|
|
||||||
X11DRV_CoerceDIBSection(physDev, DIB_Status_GdiMod);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
case X11DRV_FLUSH_GL_DRAWABLE:
|
case X11DRV_FLUSH_GL_DRAWABLE:
|
||||||
flush_gl_drawable(physDev);
|
flush_gl_drawable(physDev);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -111,7 +111,6 @@ typedef struct wine_glpixelformat {
|
||||||
|
|
||||||
typedef struct wine_glcontext {
|
typedef struct wine_glcontext {
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
BOOL do_escape;
|
|
||||||
BOOL has_been_current;
|
BOOL has_been_current;
|
||||||
BOOL sharing;
|
BOOL sharing;
|
||||||
DWORD tid;
|
DWORD tid;
|
||||||
|
@ -1950,11 +1949,7 @@ BOOL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc)
|
||||||
ctx->drawables[1] = drawable;
|
ctx->drawables[1] = drawable;
|
||||||
ctx->refresh_drawables = FALSE;
|
ctx->refresh_drawables = FALSE;
|
||||||
|
|
||||||
if (type == OBJ_MEMDC)
|
if (type == OBJ_MEMDC) pglDrawBuffer(GL_FRONT_LEFT);
|
||||||
{
|
|
||||||
ctx->do_escape = TRUE;
|
|
||||||
pglDrawBuffer(GL_FRONT_LEFT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
|
Loading…
Reference in a new issue