Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:57:57+00:00 2026-05-29T19:57:57+00:00

I am making a racing game and I would like to print some information

  • 0

I am making a racing game and I would like to print some information such as speed, lap, key bindings etc. on the screen of my scene. I want them to be flat on the screen, having a position lets say fixed in front of the camera (like speedometers in real games) not inside my scene – if that’s not possible then I ll print them inside my scene.

Do you know what functions can I use (glutBitmapCharacter?)I tried printw but my program doesn’t compile. What do you propose?

There will be multiple messages printed from various routines

I have already tried this (nothing displays on screen)

glPushMatrix();
                 glRasterPos2f(100, 100);
                 glColor3f(0.0,0.5,0.1);
                sprintf(message,"\nLap(User):%d",lapsB);
                len = (int) strlen(message);
                for (int i = 0; i < len; i++) {
                    glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, message[i]);
                }
                glPopMatrix();

One more thing how can I create a menu – is there any method I can use, user will have to chose between 3 entries, input by pressing 1 or 2 or 3 on keyboard only

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:57:58+00:00Added an answer on May 29, 2026 at 7:57 pm

    I have the feeling you are passing too big values for glRasterPos2f(100, 100);
    Here is a good post where you can see how to display text using GLUT printing text with glut.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Long story short, I'm making a racing game in Java. I'm self-taught using some
Im looking for an algorithm to be used in a racing game Im making.
My Django-Project is making some strange faned-out GET calls when opening on model from
Making a game with OpenGL/GLUT and C++. I've heard the easiest way to manage
Making a footer for a web site I stumbled upon some strange behavior of
Making game of life I need to a have a grid that is 30x20
Im making a browser mafia game, and coding the page where it lists all
I am making a ticker which will eventually look like ESPN's bottom line. Internet
Making my Bluetooth application I need access to some broadcast actions on the Android
Making a 2D OpenGL game. When rendering a frame I need to first draw

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.