
こんなのがシンプルで激しく欲しいのですが。
何処かに売ってないでしょうか? orz
ねこさんのぐうたらなにちじょう
#if defined(GLUI_FREEGLUT)
// FreeGLUT does not yet work perfectly with GLUI
// - use at your own risk.
#include <GL/freeglut.h>
#elif defined(GLUI_OPENGLUT)
// OpenGLUT does not yet work properly with GLUI
// - use at your own risk.
#include <GL/openglut.h>
…起動時の挙動が変だったりするのはその所為かなぁ。
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTBitmapGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTCharmap.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTContour.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTExtrdGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTFace.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLBitmapFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLExtrdFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLOutlineFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLPixmapFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLPolygonFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGLTextureFont.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTGlyphContainer.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTLibrary.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTOutlineGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPixmapGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPoint.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTPolyGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTSize.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTTextureGlyph.cpp
g++ -I..\include -Ic:\mingw\local\include -Ic:\mingw\local\include\freetype2 -O3 -c FTVectoriser.cpp
ar -r libftgl.a *.o
ranlib libftgl.a
ってバッチファイルを作成して(もちろんぐうたらなので手で書いたりはしません)実行。
nekosan> g++ -mwindows -DFREEGLUT_STATIC -I..\include
-I\mingw\local\include -I\mingw\local\include\freetype2
-O3 -o FTGLDemo.exe FTGLDemo.cpp tb.c trackball.c
-L\mingw\local\lib -L..\src -lftgl -lfreetype
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
てな感じで動作確認、そうそうXPで動かすときはフォントパスを
#define FONT_FILE "C:\\WINDOWS\\Fonts\\arial.ttf"
変更するのを忘れずに。
LIBGL = -lglu32 -lopengl32
LIBS = -lwinmm -lgdi32 -lm
LIBGLUT = -lglut32
CPPFLAGS += -DGLUI_FREEGLUT -DFREEGLUT_STATIC
こんな感じに修正してできた。
nekosan> bjam -sTOOLS=mingw --prefix=c:\mingw\local install
こんな感じで指定。確かMsysからコンパイルしようとしてハマった記憶があるのでCMD.exeからコンパイル。その際に環境変数PATHに"C:\mingw\bin;C:\mingw\mingw32\bin"とかコンパイラ・リンカのパスを付加するのを忘れずに (^^;;
(require 'un-define)
(require 'jisx0213)
(set-language-environment "Japanese")
を付け足すだけ。
;; c++-modeの設定
(add-hook 'c++-mode-hook
'(lambda()
(c-set-style "stroustrup")
(c-set-offset 'innamespace 0)
))
も付け足しときました。
ifdef COMSPEC
# ごろごろ
else
# うにゃうにゃ
endif
ちょっと幸せになった気がしました。