PDA

View Full Version : Overwriting text question



01-18-2002, 01:34 PM
I'm a real newbie with OpenGL, so please excuse if this seems like a dumb question. I have an app that needs to update ASCII data in cells within a window. I can display text just fine using glRasterPos and glutBitmapCharacter, but when I try to update the character, the pixel bits get or'd with the currently displayed character. I need to replace characters at specific locations (as fast as possible). How can I do this?

mikael_aronsson
01-18-2002, 04:07 PM
Hi !

You can't "modify" a rendered image in OpenGL because you just add stuff to it (that's why you get the OR effect), you need to clear the color buffer and render evrything again.

glClear( GL_COLOR_BUFFER_BIT);

Mikael