[PATCH 3/5] wined3d: Don't use GL_EXTCALL for WGL extension functions.
Henri Verbeet
hverbeet at codeweavers.com
Sun Jul 22 07:59:54 CDT 2012
---
dlls/wined3d/context.c | 4 ++--
dlls/wined3d/directx.c | 13 ++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index e53936f..2cbb34a 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -741,7 +741,7 @@ static BOOL context_set_pixel_format(const struct wined3d_gl_info *gl_info, HDC
* when really needed. */
if (gl_info->supported[WGL_WINE_PIXEL_FORMAT_PASSTHROUGH])
{
- if (!GL_EXTCALL(wglSetPixelFormatWINE(dc, format)))
+ if (!gl_info->wglSetPixelFormatWINE(dc, format))
{
ERR("wglSetPixelFormatWINE failed to set pixel format %d on device context %p.\n",
format, dc);
@@ -1469,7 +1469,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
if (gl_info->supported[WGL_EXT_SWAP_CONTROL])
{
- if (!GL_EXTCALL(wglSwapIntervalEXT(swap_interval)))
+ if (!gl_info->wglSwapIntervalEXT(swap_interval))
ERR("wglSwapIntervalEXT failed to set swap interval %d for context %p, last error %#x\n",
swap_interval, ret, GetLastError());
}
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 6b60966..b50546c 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2626,8 +2626,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
hdc = pwglGetCurrentDC();
/* Not all GL drivers might offer WGL extensions e.g. VirtualBox. */
- if (GL_EXTCALL(wglGetExtensionsStringARB))
- WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc));
+ if (gl_info->wglGetExtensionsStringARB)
+ WGL_Extensions = gl_info->wglGetExtensionsStringARB(hdc);
if (!WGL_Extensions)
WARN("WGL extensions not supported.\n");
else
@@ -5502,7 +5502,7 @@ static BOOL InitAdapters(struct wined3d *wined3d)
int nAttribs = 0;
attribute = WGL_NUMBER_PIXEL_FORMATS_ARB;
- GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &cfg_count));
+ gl_info->wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &cfg_count);
adapter->cfg_count = cfg_count;
adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, adapter->cfg_count * sizeof(*adapter->cfgs));
@@ -5521,9 +5521,7 @@ static BOOL InitAdapters(struct wined3d *wined3d)
for (iPixelFormat=1; iPixelFormat <= adapter->cfg_count; ++iPixelFormat)
{
- res = GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, nAttribs, attribs, values));
-
- if(!res)
+ if (!gl_info->wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, nAttribs, attribs, values))
continue;
/* Cache the pixel format */
@@ -5546,7 +5544,8 @@ static BOOL InitAdapters(struct wined3d *wined3d)
{
int attrib[2] = {WGL_SAMPLE_BUFFERS_ARB, WGL_SAMPLES_ARB};
int value[2];
- if(GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 2, attrib, value))) {
+ if (gl_info->wglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, 2, attrib, value))
+ {
/* value[0] = WGL_SAMPLE_BUFFERS_ARB which tells whether multisampling is supported.
* value[1] = number of multi sample buffers*/
if(value[0])
--
1.7.8.6
More information about the wine-patches
mailing list