コード例 #1
0
ファイル: Sprite.cs プロジェクト: vtserej/3d-collision-opengl
        static public void DrawBoldCenterText(int y, string text, IntPtr font)
        {
            int x = Glut.glutStrokeLength(font, text);

            x = Globals.ScreenWidthOver2 - x / 2;
            Gl.glRasterPos2f(x, y);
            for (int i = 0; i < text.Length; i++)
            {
                Glut.glutBitmapCharacter(font, text[i]);
            }
        }
コード例 #2
0
ファイル: Sprite.cs プロジェクト: vtserej/3d-collision-opengl
 static public int FontBoldWidth(IntPtr font, string text)
 {
     return(Glut.glutStrokeLength(font, text));
 }