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 3 of 3

Thread: how to display a 3 digit counter in a OpenGL window??

  1. #1
    Intern Contributor
    Join Date
    Oct 2002
    Location
    bangalore
    Posts
    56

    how to display a 3 digit counter in a OpenGL window??

    hi all,
    i want a 3 digit counter(000-999) to be displayed on left up corner of the window.
    i am using glutBitmapCharacter function for putting the digits character by character.

    my problem is that, when i run the program , i am not getting the display of counter which is changing contineously.
    since counter has to be at the same position,
    it is getting overwritten and i am ending up with some sort of Mesh without the actual no.s.
    but the counting happens correctly.
    so pls help me out to ge the exact display.
    thanks & regards
    Prashant G.P

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,070

    Re: how to display a 3 digit counter in a OpenGL window??

    I think that you are not using glClear at the start of your display routine.

    But post your code, and can advise more.


    Originally posted by prashantgp:
    hi all,
    i want a 3 digit counter(000-999) to be displayed on left up corner of the window.
    i am using glutBitmapCharacter function for putting the digits character by character.

    my problem is that, when i run the program , i am not getting the display of counter which is changing contineously.
    since counter has to be at the same position,
    it is getting overwritten and i am ending up with some sort of Mesh without the actual no.s.
    but the counting happens correctly.
    so pls help me out to ge the exact display.

  3. #3
    Intern Contributor
    Join Date
    Oct 2002
    Location
    bangalore
    Posts
    56

    Re: how to display a 3 digit counter in a OpenGL window??

    hello all,
    i got the answer. i used idle function and was able to get the results.
    thanks to all & in particular to nexusone.

    nexus, if we use glClear it clears whole window. but i wanted only certain position of window to be cleared.
    thanks & regards
    Prashant G.P

Posting Permissions

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