FTGL and display lists

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" );


For the aboe code listing . it get “HI” in the output :frowning:

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.

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.

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 …