Jump to content
  • Advertisement
Sign in to follow this  
_gl_coder_one_

FTGL and Display List causing Problems

This topic is 2439 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

Hi all i have been working at getting FTGL commands compiled into a display list. Its killing me [:(] . When I disable use of display list in FTGl( using the UseDisplayList( false ) ) function and use the Render() call ... it seems that characters that have appeared once are not being rendered. Now any adive on this .. the code listing follows I use FTGLPolygon fonts

dlist = glGenLists( 1 );
glNewList( dlist , GL_COMPILE_AND_EXECUTE );

font->Render(" THIS CANT HAPPEN ")

glEndList();

For the aboe code listing . i get THIS CAN P E

Share this post


Link to post
Share on other sites
Advertisement
FTGL has worked fine for me in the past. The missing characters make it sound like they're probably being draw on top of each other or something. The best advice I can give is to check your modelview matrix and rasterpos.

Share this post


Link to post
Share on other sites
Hi
thanks for replying ..
it seems the matrices are okay ..
Am i using the FONT object in the right manner.. here is how i do it ..


GLuint d_list = glGenLists( 1 );
FTGLPolygonFont* font = new FTGLPolygonFont( "times.ttf" );
//now disable use of display list inside FTGL
font->UseDisplayList( false );
glNewList( d_list , GL_COMPILE );

font->Render( "THIS CANT HAPPEN" );

glEndList();

//reenable use of display lists inside FTGL
font->UseDisplayList( true );


Am i rite
Can u give some code suggesting proper usage of FTGL ... ur is it a problem using
display lists with FTGL...



Alos any other way for Font rendering in OpenGL?


Share this post


Link to post
Share on other sites
I have already described what's your problem on opengl.org so you can look there.

If you want to use FTGL with your own DL you can use other font types ( if you dont want to change the source of FTGL ). For example TextureFont cant be imho used with your list without problem

Share this post


Link to post
Share on other sites
Sorry to bump a 6 year old thread, but I've just been struggling with the same problem for something like 4 hours, missing characters when rendering FTGL text, and this was the only remotely relevent google result. Having solved it, I feel obliged to share the solution.

The solution is simple: Increase the font size. In my case, I had to use at least a font size of 14 to get all characters to work on my NVIDIA card, and 15 to get it to work on my ATI card. Play around until you get all the characters. If you're worried about the font size being to big for what you want it to be, use glScalef to adjust the size afterwards.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!