[cairo-bugs] [Bug 89208] Link errors when building cairo 1.12.18 on Windows.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 18 07:19:08 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89208
peavo at outlook.com changed:
What |Removed |Added
----------------------------------------------------------------------------
OS|All |Windows (All)
--- Comment #1 from peavo at outlook.com ---
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:
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150218/24a809d0/attachment.html>
More information about the cairo-bugs
mailing list