Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dirtypope

Font rendering in lesson23

This topic is 6237 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made myself a nice font.h header file in my workspace, and went off of nehe''s tut #13 and modified it some to suit my needs, then i call it how he says to call it, and i get no errors, but i do get some bugs... 1) Instead of just the text being colored, theres a colored tint over the entire scrren so all my objects show up greenish like im wearing night vision (must find out whats causing this bug so that i dont have to think too hard to implement night vision later lol) 2) i cant even see the text... any idea''s whats causing this? im pretty positive the bug is in theese 2 lines... glColor3f(1.0f*float(cos(cnt1)),1.0f*float(sin(cnt2)),1.0f-0.5f*float(cos(cnt1+cnt2))); glRasterPos2f(-0.45f+0.05f*float(cos(cnt1)), 0.35f*float(sin(cnt2))); what i think is causing the nightvision effect is the glColor3f how can i make that only apply to my font... that might also be why i cant see the font, because it tints my objects that color.... if its not the color why i cant see it, its probably the glrasterpos, any of you have an idea on how to fix this?

Share this post


Link to post
Share on other sites
Advertisement
your fix to my problem did not work... i have the function in a header file (font.h) i called it lise it says in the tut and that didnt work... heres my current text code from DrawGLscene()

------------------------------------------------
glColor3f(0.5f,2.0f,1.5f);
glRasterPos2f(-0.45f,0.35f);
glPrint("TEST");
glColor3f(1.0f, 1.0f, 1.0f);
------------------------------------------------
as you can see i simplified it alot, the screen is no longer a tinted color, but i still cant see my text... man this is annoying me *rips hair out*

thx in advance for the help

Share this post


Link to post
Share on other sites
YAY!! i got it somewhat working... my stupid problem was it wasnt after translatef! grrr the only part that needs fixing now, is the fact that it doesnt move with the camera, it just stays in one area lol.

Share this post


Link to post
Share on other sites
another problem is the text stays black no matter what =(

i call the color before i call the text, then after the text i set it back to 1.0,1.0,1.0 text stays black =(

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!