Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: please help me ..

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    5

    please help me ..

    hey.. i am a beginner to opengl.. i have to do a mini project. in that i want to display the project details in the front screen.. i am not able to find a function to display the text... please help me..

  2. #2
    Member Regular Contributor
    Join Date
    Jan 2012
    Location
    Germany
    Posts
    302

    Re: please help me ..

    OpenGL has no textrendering. You can use 3rd party libraries for that. A static text could get displayed as a texture.

  3. #3
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,171

    Re: please help me ..

    Please don't just post open ended questions or pleas like " help me".
    Have you read the posting guide?
    Ask specific questions.

    Now you could just draw your text in a bitmap image using MS Paint or other art package. Then just display the bitmap on the front screen. Great if you don't need dynamic printing.

  4. #4
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    5

    displaying text

    ok.. can you please tell me more about displaying bitmap

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: displaying text

    Setup an orthographic projection.
    http://www.opengl.org/wiki/FAQ#How_t...in_pixel_space

    and disable depth testing.
    and render some quads on your screen.

    But if you are confused an need to learn things, try the old NeHe tutorials
    http://nehe.gamedev.net/tutorial/lessons_11__15/28001/
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •