views:

357

answers:

1

I'm creating a game in OpenGL which loads the entire Arial Unicode MS font when it loads. The program uses on avg. 10 megs of memory on my computer (op sys is WinXP SP2) and runs without problems, but when I move the program to my laptop (with Vista) the wglUseFontBitmaps hangs and allocates memory fluently and never returns. This problem occured recently and I have no idea why and never had such problem before. Why does wglUseFontBitmaps do this and how to fix it?

update: I tried an older version and it runs but eats 400megs of memory (so it is not a new problem)

+1  A: 

How many glyph display lists are you trying to generate with wglUseFontBitmaps()? Can you show us your invocation? Perhaps Vista is trying to do all 60000-some-odd glyphs in one go, and XP is doing some sort of on-demand construction?

I've had good luck with FreeType2 and MS Arial Unicode, though it does take some time to get up to speed with the API. This tutorial can be C++-ized to great effect.

genpfault
I loaded just the entire font...#define UNICODEFONTSIZE 65535...SelectObject(hdc,hfontArialUnicodeStuff);wglUseFontBitmapsW(hdc, 0, UNICODEFONTSIZE,ListBase);...Please note this does not cause any problems on XP.I have heard that Vista has some OpenGL issues. This may be one of them.
Calmarius
For XP, 10MB Mem Usage or Mem Usage + VM Size?
genpfault
overall mem usage
Calmarius
Do the machines have the same DPI? Does the machines have different ClearType settings?
Adrian McCarthy