Computer Graphics

Moderators: Sephiroth
Number of threads: 1263
Number of posts: 2665

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
OpenGL character question Posted by jeffpost on 25 Jan 2002 at 1:28 PM
I have an application I wrote many years ago for DOS and I'd like to port it to Windows using OpenGL. I need to update ASCII characters displayed in cells rapidly. If I call glutBitmapCharacter(), the new character overlays the old character (ORs the pixels together) instead of overwriting it (replacing the pixels). This results in unreadable text.

Anyone know how to replace a character in a cell without having to update the entire window?

Thanks.

Report
Re: OpenGL character question Posted by Sephiroth on 25 Jan 2002 at 6:10 PM
: I have an application I wrote many years ago for DOS and I'd like to port it to Windows using OpenGL. I need to update ASCII characters displayed in cells rapidly. If I call glutBitmapCharacter(), the new character overlays the old character (ORs the pixels together) instead of overwriting it (replacing the pixels). This results in unreadable text.
:
: Anyone know how to replace a character in a cell without having to update the entire window?
:
: Thanks.
:
:
Wann'a know how to double your frames and fix your problem? Dump GLUT and use JUST OpenGL like I do. GLUT has the advantage of the coder not having to code in a few things, but it has too many draw-backs to name, and you have found one I didn't know about. GLUT also lowers frames as mentioned earlier. Check out nehe.gamedev.net for some AWESOME text tutorials in OpenGL that don't require GLUT! A simple routine and you can put any text, ANYWHERE! Just send it a string and some X/Y coordinates.

-Sephiroth

Report
Re: OpenGL character question Posted by jeffpost on 25 Jan 2002 at 7:31 PM
:
: :
: Wann'a know how to double your frames and fix your problem? Dump GLUT and use JUST OpenGL like I do. GLUT has the advantage of the coder not having to code in a few things, but it has too many draw-backs to name, and you have found one I didn't know about. GLUT also lowers frames as mentioned earlier. Check out nehe.gamedev.net for some AWESOME text tutorials in OpenGL that don't require GLUT! A simple routine and you can put any text, ANYWHERE! Just send it a string and some X/Y coordinates.
:

Thanks for the info. At one time I did look at nehe.gamedev.net and didn't find what I needed. Could you be more specific about what I should look for?

What is the simple routine for putting text anywhere with just a string and x,y coordinates? If you could send sample code, I'd really appreciate it. My email address is in my profile.

Thanks,
Jeff


Report
Re: OpenGL character question Posted by Sephiroth on 25 Jan 2002 at 10:13 PM
http://nehe.gamedev.net/tutorials/lesson13.asp

That is the lesson that teaches you how to do bitmapped fonts in OpenGL. He shows his sources as usual and walks you through it step by step. If you have any questions or problems with that code, let me know.

-Sephiroth




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.