Re: renderString problems

"Stuart Cook" <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe,gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
On 8/2/07, Dave Tapley <[email protected]> wrote:
> Using a BitmapFont I can get strings to appear but they demonstrate
> the odd behaviour of translating themselves a distance equal to their
> length every time my displayCallback function is evaluated.

I've never used OpenGL from Haskell, but it sounds like renderString
is modifying your modelview matrix with each call, presumably to make
it easier to chain lots of text together in one frame. Since the
matrix never gets reset, the translation effect accumulates each time
the scene is redrawn.

The quick fix would be to call loadIdentity (i.e. glLoadIdentity) each
time you update, before drawing anything.


Stuart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.