Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
C
cairo
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 382
    • Issues 382
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 21
    • Merge Requests 21
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cairo
  • cairo
  • Merge Requests
  • !54

Open
Opened Aug 28, 2020 by Antonio Ospite@ao2
  • Report abuse
Report abuse

WIP: gl: add support for opengl32 from MinGW which is OpenGL 1.1

  • Overview 3
  • Commits 1
  • Pipelines 1
  • Changes 6

When building cairo for Windows with mingw-w64 and the gl backend enabled the linker complains about undefined references to glActiveTexture and glBlendFuncSeparate:

-----------------------------------------------------------------------
/usr/bin/x86_64-w64-mingw32-ld: src/libcairo-2.dll.p/cairo-gl-composite.c.obj: in function `_cairo_gl_context_setup_operand':
/home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-composite.c:343: undefined reference to `glActiveTexture'
/usr/bin/x86_64-w64-mingw32-ld: /home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-composite.c:361: undefined reference to `glActiveTexture'
/usr/bin/x86_64-w64-mingw32-ld: src/libcairo-2.dll.p/cairo-gl-composite.c.obj: in function `_cairo_gl_set_operator':
/home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-composite.c:484: undefined reference to `glBlendFuncSeparate'
/usr/bin/x86_64-w64-mingw32-ld: /home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-composite.c:486: undefined reference to `glBlendFuncSeparate'
/usr/bin/x86_64-w64-mingw32-ld: src/libcairo-2.dll.p/cairo-gl-device.c.obj: in function `_cairo_gl_context_activate':
/home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-device.c:344: undefined reference to `glActiveTexture'
/usr/bin/x86_64-w64-mingw32-ld: /home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-device.c:346: undefined reference to `glActiveTexture'
/usr/bin/x86_64-w64-mingw32-ld: src/libcairo-2.dll.p/cairo-gl-glyphs.c.obj: in function `_cairo_gl_glyph_cache_add_glyph':
/home/ao2/WIP/gnome/gtk/subprojects/cairo/build-meson/../src/cairo-gl-glyphs.c:133: undefined reference to `glActiveTexture'
collect2: error: ld returned 1 exit status
-----------------------------------------------------------------------

This happens because the opengl32 library only exposes OpenGL 1.1 entry points.

Querying the two entry points via the GetProcAddress mechanism in cairo-gl-dispatcher.c fixes the build issues.

This change was originally proposed by daniel on https://bugs.freedesktop.org/show_bug.cgi?id=82054

Fixes #204

Edited Aug 28, 2020 by Antonio Ospite
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: cairo/cairo!54
Source branch: fix-missing-OpenGL-symbols-on-mingw