View Full Version : FTGL and display lists

04-21-2006, 12:30 AM
Hi all
i have been working at getting ftgl commands compiled into a display list.
Its killing me :confused: . 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

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


ffont->Render("I" );

ffont->Render("H" );

glEndList();For the aboe code listing . it get "HI" in the output :(

04-21-2006, 11:29 AM
I don't know FTGL but if UseDisplayLIst(false) really disables DL, then how can you expect them to work properly ??

Btw this seems not advanced.

04-22-2006, 01:38 PM
hi jide
that u DONT know FTGL is clear from your post.

To clarify
We use the UseDisplayList( false ) .. to disable FTGL from using display lists internally . so that one can compile FTGL commands into a display list.

04-23-2006, 12:38 AM
If you look into the FTGL source into FTGLPolyGlyph::Render() method ( and I assume you are using polyglyphs from you gamedev post ) its' quite clear that all what it do is calling the FTGL inernal display list. So if you disable the FTGL's lists than no geometry is drawn in this call so nothing happens.

The geometry is created in the constructor of PolyGlyph. You need to either change your code or change FTGL. Both should be quite easy.

PS: I don't know if it's a bug in the FTGL as I don't use it for PolyGlyphs ..