Results 1 to 3 of 3

Thread: fonts in freeglut

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2011
    Posts
    27

    fonts in freeglut

    I use this function to draw my text.
    Code :
    void glutPrint(float x, float y, LPVOID font, char* text, float red, float green, float blue)
    {
        if(!text || !strlen(text)) return;
        bool blending = false;
        if(glIsEnabled(GL_BLEND)) blending = true;
        glEnable(GL_BLEND);
        glColor3f(red,green,blue);
        glRasterPos2f(x,y);
        while (*text) {
            glutBitmapCharacter(font, *text);
            text++;
        }
        if(!blending) glDisable(GL_BLEND);
    }
    what can I do to make my text bigger? Are their any other fonts than :
    GLUT_BITMAP_8_BY_13 - A variable-width font with every character fitting in a rectangle of 13 pixels high by at most 8 pixels wide.
    GLUT_BITMAP_9_BY_15 - A variable-width font with every character fitting in a rectangle of 15 pixels high by at most 9 pixels wide.
    GLUT_BITMAP_TIMES_ROMAN_10 - A 10-point variable-width Times Roman font.
    GLUT_BITMAP_TIMES_ROMAN_24 - A 24-point variable-width Times Roman font.
    GLUT_BITMAP_HELVETICA_10 - A 10-point variable-width Helvetica font.
    GLUT_BITMAP_HELVETICA_12 - A 12-point variable-width Helvetica font.
    GLUT_BITMAP_HELVETICA_18 - A 18-point variable-width Helvetica font.
    ???

    please suggest me other ideas too

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2009
    Location
    FL , USA
    Posts
    192

    Re: fonts in freeglut

    Vector font FTGL. WGL.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    1

    Re: fonts in freeglut

    Could someone help me how to draw a text ex : "HELLO" in openGL window. Iam using Tao framework with Visual Basic 2008. Please help me.
    Thank you.

Similar Threads

  1. freeglut.dll
    By sumsar in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-20-2013, 02:00 PM
  2. troubles with freeglut.lib
    By animaks in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-04-2012, 10:27 PM
  3. freeglut installation
    By jyoti in forum OpenGL: Linux
    Replies: 10
    Last Post: 07-07-2009, 01:40 AM
  4. bitmap fonts vs texture fonts
    By ehsan2004 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-31-2005, 03:24 AM
  5. What is freeglut.lib?
    By AliceNarcissus in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 02-24-2005, 10:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean