FTGL Fonts rendering woes

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.

Please help  .. the code listing follows

[CODE]

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


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



glEndList();

[/CODE]

For the aboe code listing i get the following o/p

THIS  CAN                P E


Any ideas ...

0
4/21/2006 6:42:54 AM
comp.graphics.api.opengl 7072 articles. 1 followers. Post Follow

8 Replies
933 Views

Similar Articles

[PageSpeed] 51

shekhar.kaushik@gmail.com wrote:
> 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.
> 
> Please help  .. the code listing follows
> 
> [CODE]
> 
> dlist = glGenLists( 1 );
> glNewList( dlist , GL_COMPILE_AND_EXECUTE );
> 
> 
> ffont->Render(" THIS CANT HAPPEN " );
> 
> 
> 
> glEndList();
> 
> [/CODE]
> 
> For the aboe code listing i get the following o/p
> 
> THIS  CAN                P E
> 
> 
> Any ideas ...
> 

Hi!

How do you initialize ffont?
0
Jan
4/21/2006 1:12:30 PM
Hi

This is how

FTFont* ffont = new FTGLPolygonFont( "times.ttf" );


calls to ffont->Render() work perfectly . Porblems come only when i
want to compile it into a display list ..

I call

ffont->UseDisplayList( false )  before glNewList()

I think thas the correct usage  isnt it ?


if i do not disable use of lists in FTGL
 and try compiling Render() calls into a display list only the first
character is rendered and a GL error state is set.




Jan Boehme wrote:

> shekhar.kaushik@gmail.com wrote:
> > 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.
> >
> > Please help  .. the code listing follows
> >
> > [CODE]
> >
> > dlist = glGenLists( 1 );
> > glNewList( dlist , GL_COMPILE_AND_EXECUTE );
> >
> >
> > ffont->Render(" THIS CANT HAPPEN " );
> >
> >
> >
> > glEndList();
> >
> > [/CODE]
> >
> > For the aboe code listing i get the following o/p
> >
> > THIS  CAN                P E
> >
> > 
> > Any ideas ...
> > 
> 
> Hi!
> 
> How do you initialize ffont?

0
shekhar
4/21/2006 1:25:49 PM
<shekhar.kaushik@gmail.com> wrote in message
news:1145601774.603980.284470@e56g2000cwe.googlegroups.com...
> ffont->Render(" THIS CANT HAPPEN " );
[...]
> For the aboe code listing i get the following o/p
>
> THIS  CAN                P E

I don't know what the solution is but surely you noticed every first render
of each character is OK?
It is possible same characters are rendered on top of each other on the same
coords, or are destroyed after being used the first time.

[jongware]


0
jongware
4/21/2006 9:31:18 PM
yes the character seems to be okay
I dont know the internals of FTGL .. so really cant understand where to

search for  the problem.


[jongware] wrote:

> <shekhar.kaushik@gmail.com> wrote in message
> news:1145601774.603980.284470@e56g2000cwe.googlegroups.com...
> > ffont->Render(" THIS CANT HAPPEN " );
> [...]
> > For the aboe code listing i get the following o/p
> >
> > THIS  CAN                P E
>
> I don't know what the solution is but surely you noticed every first render
> of each character is OK?
> It is possible same characters are rendered on top of each other on the same
> coords, or are destroyed after being used the first time.
> 
> [jongware]

0
shekhar
4/21/2006 10:21:28 PM
no solution ppl ??? 
Jan i thought u may have one

0
shekhar
4/22/2006 7:36:23 PM
Hi,

Where can I get FTGL? I couldn't download it from the official website. 
Thank you.

f.f

shekhar.kaushik@gmail.com wrote:
> 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.
> 
> Please help  .. the code listing follows
> 
> [CODE]
> 
> dlist = glGenLists( 1 );
> glNewList( dlist , GL_COMPILE_AND_EXECUTE );
> 
> 
> ffont->Render(" THIS CANT HAPPEN " );
> 
> 
> 
> glEndList();
> 
> [/CODE]
> 
> For the aboe code listing i get the following o/p
> 
> THIS  CAN                P E
> 
> 
> Any ideas ...
> 
0
f
4/24/2006 2:36:43 PM
I u are looking for the code ... u can find it here

http://packages.qa.debian.org/f/ftgl.html



f.f wrote:

> Hi,
>
> Where can I get FTGL? I couldn't download it from the official website.
> Thank you.
>
> f.f
>
> shekhar.kaushik@gmail.com wrote:
> > 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.
> >
> > Please help  .. the code listing follows
> >
> > [CODE]
> >
> > dlist = glGenLists( 1 );
> > glNewList( dlist , GL_COMPILE_AND_EXECUTE );
> >
> >
> > ffont->Render(" THIS CANT HAPPEN " );
> >
> >
> >
> > glEndList();
> >
> > [/CODE]
> >
> > For the aboe code listing i get the following o/p
> > 
> > THIS  CAN                P E
> > 
> > 
> > Any ideas ...
> >

0
shekhar
4/25/2006 5:26:23 AM
shekhar.kaushik@gmail.com wrote:
> Hi
> 
> This is how
> 
> FTFont* ffont = new FTGLPolygonFont( "times.ttf" );
> 
> 
> calls to ffont->Render() work perfectly . Porblems come only when i
> want to compile it into a display list ..
> 
> I call
> 
> ffont->UseDisplayList( false )  before glNewList()
> 
> I think thas the correct usage  isnt it ?
> 

Yes, in theory. If you watch the source code you see there is no reason
why it should work.
I reported this in 12/2004 but the ftgl guy released nothing after 12/2004.
I fixed it for my needings and sent it to him but ...

> 
> if i do not disable use of lists in FTGL
>  and try compiling Render() calls into a display list only the first
> character is rendered and a GL error state is set.

I tried this too but in my case it creates to many dls.

Cheers, Jan.
0
Jan
4/27/2006 11:02:01 AM
Reply: