gdi32: Route WGL font code through gdi32.dll.
This commit is contained in:
parent
4b212dc401
commit
95a67ab373
|
@ -198,6 +198,8 @@ static struct graphics_driver *create_driver( HMODULE module )
|
|||
/* OpenGL32 */
|
||||
GET_FUNC(wglCreateContext);
|
||||
GET_FUNC(wglMakeCurrent);
|
||||
GET_FUNC(wglUseFontBitmapsA);
|
||||
GET_FUNC(wglUseFontBitmapsW);
|
||||
#undef GET_FUNC
|
||||
}
|
||||
else memset( &driver->funcs, 0, sizeof(driver->funcs) );
|
||||
|
|
|
@ -500,6 +500,8 @@
|
|||
#
|
||||
@ stdcall wglCreateContext(long)
|
||||
@ stdcall wglMakeCurrent(long long)
|
||||
@ stdcall wglUseFontBitmapsA(long long long long)
|
||||
@ stdcall wglUseFontBitmapsW(long long long long)
|
||||
|
||||
################################################################
|
||||
# Wine extensions: Win16 functions that are needed by other dlls
|
||||
|
|
|
@ -186,6 +186,8 @@ typedef struct tagDC_FUNCS
|
|||
/* OpenGL32 */
|
||||
HGLRC (*pwglCreateContext)(PHYSDEV);
|
||||
BOOL (*pwglMakeCurrent)(PHYSDEV, HGLRC);
|
||||
BOOL (*pwglUseFontBitmapsA)(PHYSDEV, DWORD, DWORD, DWORD);
|
||||
BOOL (*pwglUseFontBitmapsW)(PHYSDEV, DWORD, DWORD, DWORD);
|
||||
} DC_FUNCTIONS;
|
||||
|
||||
/* It should not be necessary to access the contents of the GdiPath
|
||||
|
|
|
@ -74,3 +74,41 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
|
|||
GDI_ReleaseObj( hdc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* wglUseFontBitmapsA (OPENGL32.@)
|
||||
*/
|
||||
BOOL WINAPI wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
|
||||
TRACE("(%p, %ld, %ld, %ld)\n", hdc, first, count, listBase);
|
||||
|
||||
if (!dc) return FALSE;
|
||||
|
||||
if (!dc->funcs->pwglUseFontBitmapsA) FIXME(" :stub\n");
|
||||
else ret = dc->funcs->pwglUseFontBitmapsA(dc->physDev, first, count, listBase);
|
||||
|
||||
GDI_ReleaseObj( hdc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* wglUseFontBitmapsW (OPENGL32.@)
|
||||
*/
|
||||
BOOL WINAPI wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
DC * dc = DC_GetDCPtr( hdc );
|
||||
|
||||
TRACE("(%p, %ld, %ld, %ld)\n", hdc, first, count, listBase);
|
||||
|
||||
if (!dc) return FALSE;
|
||||
|
||||
if (!dc->funcs->pwglUseFontBitmapsW) FIXME(" :stub\n");
|
||||
else ret = dc->funcs->pwglUseFontBitmapsW(dc->physDev, first, count, listBase);
|
||||
|
||||
GDI_ReleaseObj( hdc);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -394,7 +394,7 @@
|
|||
@ stdcall wglShareLists(long long)
|
||||
@ stdcall wglSwapBuffers(long) gdi32.SwapBuffers
|
||||
@ stdcall wglSwapLayerBuffers(long long)
|
||||
@ stdcall wglUseFontBitmapsA(long long long long)
|
||||
@ stdcall wglUseFontBitmapsW(long long long long)
|
||||
@ stdcall wglUseFontBitmapsA(long long long long) gdi32.wglUseFontBitmapsA
|
||||
@ stdcall wglUseFontBitmapsW(long long long long) gdi32.wglUseFontBitmapsW
|
||||
@ stdcall wglUseFontOutlinesA(long long long long long long long ptr)
|
||||
@ stdcall wglUseFontOutlinesW(long long long long long long long ptr)
|
||||
|
|
|
@ -52,8 +52,6 @@ typedef struct wine_wgl_s {
|
|||
HDC WINAPI (*p_wglGetCurrentDC)(void);
|
||||
PROC WINAPI (*p_wglGetProcAddress)(LPCSTR lpszProc);
|
||||
BOOL WINAPI (*p_wglShareLists)(HGLRC hglrc1, HGLRC hglrc2);
|
||||
BOOL WINAPI (*p_wglUseFontBitmapsA)(HDC hdc, DWORD first, DWORD count, DWORD listBase);
|
||||
BOOL WINAPI (*p_wglUseFontBitmapsW)(HDC hdc, DWORD first, DWORD count, DWORD listBase);
|
||||
|
||||
void WINAPI (*p_wglGetIntegerv)(GLenum pname, GLint* params);
|
||||
} wine_wgl_t;
|
||||
|
@ -327,30 +325,6 @@ BOOL WINAPI wglSwapLayerBuffers(HDC hdc,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* wglUseFontBitmapsA (OPENGL32.@)
|
||||
*/
|
||||
BOOL WINAPI wglUseFontBitmapsA(HDC hdc,
|
||||
DWORD first,
|
||||
DWORD count,
|
||||
DWORD listBase)
|
||||
{
|
||||
TRACE("(%p, %ld, %ld, %ld)\n", hdc, first, count, listBase);
|
||||
return wine_wgl.p_wglUseFontBitmapsA(hdc, first, count, listBase);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* wglUseFontBitmapsW (OPENGL32.@)
|
||||
*/
|
||||
BOOL WINAPI wglUseFontBitmapsW(HDC hdc,
|
||||
DWORD first,
|
||||
DWORD count,
|
||||
DWORD listBase)
|
||||
{
|
||||
TRACE("(%p, %ld, %ld, %ld)\n", hdc, first, count, listBase);
|
||||
return wine_wgl.p_wglUseFontBitmapsW(hdc, first, count, listBase);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GL_GLU_H
|
||||
|
||||
static void fixed_to_double(POINTFX fixed, UINT em_size, GLdouble vertex[3])
|
||||
|
@ -680,8 +654,6 @@ static BOOL process_attach(void)
|
|||
wine_wgl.p_wglGetCurrentDC = (void *)GetProcAddress(mod, "wglGetCurrentDC");
|
||||
wine_wgl.p_wglGetProcAddress = (void *)GetProcAddress(mod, "wglGetProcAddress");
|
||||
wine_wgl.p_wglShareLists = (void *)GetProcAddress(mod, "wglShareLists");
|
||||
wine_wgl.p_wglUseFontBitmapsA = (void*)GetProcAddress(mod, "wglUseFontBitmapsA");
|
||||
wine_wgl.p_wglUseFontBitmapsW = (void*)GetProcAddress(mod, "wglUseFontBitmapsW");
|
||||
|
||||
/* Interal WGL function */
|
||||
wine_wgl.p_wglGetIntegerv = (void *)GetProcAddress(mod, "wglGetIntegerv");
|
||||
|
|
|
@ -516,17 +516,6 @@ inline static void set_drawable( HDC hdc, Drawable drawable )
|
|||
ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape, 0, NULL );
|
||||
}
|
||||
|
||||
/* retrieve the X font to use on a given DC */
|
||||
inline static Font get_font( HDC hdc )
|
||||
{
|
||||
Font font;
|
||||
enum x11drv_escape_codes escape = X11DRV_GET_FONT;
|
||||
|
||||
if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape,
|
||||
sizeof(font), (LPSTR)&font )) font = 0;
|
||||
return font;
|
||||
}
|
||||
|
||||
/** for use of wglGetCurrentReadDCARB */
|
||||
inline static HDC get_hdc_from_Drawable(GLXDrawable d)
|
||||
{
|
||||
|
@ -1589,14 +1578,14 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
|
|||
}
|
||||
|
||||
/* OpenGL32 wglUseFontBitmapsA */
|
||||
BOOL WINAPI X11DRV_wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase)
|
||||
BOOL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
|
||||
{
|
||||
Font fid = get_font( hdc );
|
||||
Font fid = physDev->font;
|
||||
|
||||
TRACE("(%p, %ld, %ld, %ld) using font %ld\n", hdc, first, count, listBase, fid);
|
||||
TRACE("(%p, %ld, %ld, %ld) using font %ld\n", physDev->hdc, first, count, listBase, fid);
|
||||
|
||||
if (fid == 0) {
|
||||
return internal_wglUseFontBitmaps(hdc, first, count, listBase, GetGlyphOutlineA);
|
||||
return internal_wglUseFontBitmaps(physDev->hdc, first, count, listBase, GetGlyphOutlineA);
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
@ -1607,14 +1596,14 @@ BOOL WINAPI X11DRV_wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD l
|
|||
}
|
||||
|
||||
/* OpenGL32 wglUseFontBitmapsW */
|
||||
BOOL WINAPI X11DRV_wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase)
|
||||
BOOL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
|
||||
{
|
||||
Font fid = get_font( hdc );
|
||||
Font fid = physDev->font;
|
||||
|
||||
TRACE("(%p, %ld, %ld, %ld) using font %ld\n", hdc, first, count, listBase, fid);
|
||||
TRACE("(%p, %ld, %ld, %ld) using font %ld\n", physDev->hdc, first, count, listBase, fid);
|
||||
|
||||
if (fid == 0) {
|
||||
return internal_wglUseFontBitmaps(hdc, first, count, listBase, GetGlyphOutlineW);
|
||||
return internal_wglUseFontBitmaps(physDev->hdc, first, count, listBase, GetGlyphOutlineW);
|
||||
}
|
||||
|
||||
WARN("Using the glX API for the WCHAR variant - some characters may come out incorrectly !\n");
|
||||
|
|
Loading…
Reference in New Issue