The symbols glActiveTexture and glBlendFuncSeparate are not found.
diff --git a/src/cairo-wgl-context.c b/src/cairo-wgl-context.c index 4872374..5a1bad6 100644 --- a/src/cairo-wgl-context.c +++ b/src/cairo-wgl-context.c @@ -259,3 +259,22 @@ cairo_gl_surface_create_for_dc (cairo_device_t *device, return &surface->base.base; } + +static PFNGLACTIVETEXTUREARBPROC _glActiveTextureARB = NULL; +static PFNGLBLENDFUNCSEPARATEPROC _glBlendFuncSeparate = NULL; + +void InitWGLStuff() +{ + _glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)wglGetProcAddress((LPCSTR)"glActiveTextureARB"); + _glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)wglGetProcAddress((LPCSTR)"glBlendFuncSeparate"); +} + +GLAPI void APIENTRY glActiveTexture(GLenum texture) +{ + (*_glActiveTextureARB)(texture); +} + +GLAPI void APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) +{ + (*_glBlendFuncSeparate)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} diff --git a/src/win32/cairo-win32-system.c b/src/win32/cairo-win32-system.c index 8785530..a2c01d0 100644 --- a/src/win32/cairo-win32-system.c +++ b/src/win32/cairo-win32-system.c @@ -61,6 +61,8 @@ #include <windows.h> +void InitWGLStuff(); + /* declare to avoid "no previous prototype for 'DllMain'" warning */ BOOL WINAPI DllMain (HINSTANCE hinstDLL, @@ -75,6 +77,7 @@ DllMain (HINSTANCE hinstDLL, switch (fdwReason) { case DLL_PROCESS_ATTACH: CAIRO_MUTEX_INITIALIZE (); + InitWGLStuff(); break; case DLL_PROCESS_DETACH:
Posted a diff which fixes the link errors.
Created attachment 113624 [details] Patch Added proposed fix.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/229.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.