2012-01-14から1日間の記事一覧

3D文字列のサンプル

以下サンプル。以下のサイトのgl_test4.lzhを参考にした。 http://www2.ocn.ne.jp/~inu_inu/opengl/main.htm #include <stdafx.h> #include <windows.h> #include <GL/gl.h> #include <GL/glu.h> #include "wglfont.h" GBUN* create_3d_font(HDC hdc, char* str) { GBUN* bun; LOGFONT logfont; HFONT</gl/glu.h></gl/gl.h></windows.h></stdafx.h>…

OpenGLでの文字列の表示

基本的に、2通りある。 1) Bitmapで文字を表示する (wglUseFontBitmaps()を使用) 2) 3D文字で表示する (wglUseFontOutlines()を使用) 1)は一度フォントを作成したら拡大縮小が出来ない。 2)はglScalef()で拡大縮小が可能。 しかし、2)は厚みを持った3次元文…