LoginSignup
23
22

More than 5 years have passed since last update.

gxui - Googleが出したGoのGUIライブラリを使う

Posted at

gxuiはGoogleが作ったGUIライブラリです。

作業環境は MacOSXです。

依存解決

ビルドするには色々入れないといけないものがあります。

$ brew install glew
$ go get code.google.com/p/freetype-go/freetype/truetype
$ go get github.com/go-gl-legacy/gl
$ go get github.com/go-gl/glfw/v3.1/glfw

それと、フォントデータも必要で GoogleFontsからダウンロードしておきましょう

SourceCodePro

ビルド

gxuiのプロジェクトの中にsampleがあります。

とりあえずpolyeditをビルドします。

$ cd sample/polyedit

で 移動し 先ほどダウンロードしたフォントデータのSourceCodePro-Regular.ttfをdataディレクトクリに入れます。

.
├── data
│   └── SourceCodePro-Regular.ttf
└── main.go

そしてgo buildでビルドすればpolyeditっという実行ファイルができるので実行します。

$ ./polyedit

スクリーンショット 2015-03-17 23.38.21.png

23
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
22