Skip to content

mmaciola/thorvg-freeglut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

thorvg-freeglut

This is an example of using FreeGLUT with Thorvg. The example will load svg image and display it to the window.

thorvg.freeglut.mov

preview

Installation (macos + xcode)

  • Install freeglut: brew install freeglut
  • Install thorvg (https://github.com/Samsung/thorvg): meson build; ninja -C build install
  • Link Binaries with libraries (Build Phases): add OpenGL.framework, thorvg/build/src/libthorvg.0.dylib and /usr/local/Cellar/freeglut/3.2.1_1/lib/libglut.3.11.0.dylib
  • Add search paths (Build Setting):
    • /usr/local/Cellar/freeglut/3.2.1_1/lib and /usr/local/include for Header Search Paths
    • /usr/local/Cellar/freeglut/3.2.1_1/lib and /usr/local/lib for Library Search Paths

Installation (linux)

  • Install freeglut: sudo apt-get install freeglut3-dev
  • Install thorvg (https://github.com/Samsung/thorvg): meson build; ninja -C build install
  • Compile: cd FreeGLUTThorvg; g++ -o main main.cpp -lthorvg -lGL -lGLU -lglut
  • Run: ./main

Tips (macos)

Error freeglut (...): failed to open display '' -> install XQuartz (https://www.xquartz.org)

Warnings OpenGL is deprecated. Consider migrating to Metal instead. -> Disable Deprecated Functions in xcode (Build Settings -> Apple Clang - Warnings - All languages -> Deprecated Functions -> No)

About

An example of using FreeGLUT with Thorvg

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages