PDA

View Full Version : How do I write something to the screen



CyBBe
03-09-2000, 04:15 AM
How do I output something to the screen using GLUT???

03-10-2000, 12:38 AM
output what??

paolom
03-10-2000, 07:14 AM
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

CyBBe
03-10-2000, 09:38 AM
Sorry, I meant text, like a fps counter or a simple text...

Hude
03-12-2000, 12:54 AM
http://nate.scuzzy.net/

Marc
03-14-2000, 04:46 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif