-
Junior Member
Regular Contributor
How do I write something to the screen
How do I output something to the screen using GLUT???
-
Re: How do I write something to the screen
-
Re: How do I write something to the screen
Minimal steps:
Create the display callback
- glutInit
- glutInitWindowSize
- glutInitDisplayMode
- glutCreateWindow
- glutDisplayFunc to set the callback
Now you have an active GL rendering context and can call any GL command.
- glutMainLoop
--
Paolo
-
Junior Member
Regular Contributor
Re: How do I write something to the screen
Sorry, I meant text, like a fps counter or a simple text...
-
Re: How do I write something to the screen
-
Junior Member
Regular Contributor
Re: How do I write something to the screen
Setup:
- paint pictures with single letters or one large picture with all (or a subset of) ASCII-characters
- load that picture(s)
- make every single character a texture
--------------
- build a string you want to write (e.g. sprintf(...)
- switch to orthogonal-projection
- for each character in the string paint a square with the appropriate texture (perhaps translucent with glBlend...).
- be happy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules