PDA

View Full Version : Need help - glyph code not working on some computers



meanfox
12-22-2004, 07:18 PM
Hi,

I use GetGlyphOutline to achieve nice antialiased text. On all my test computers, and most computers in general, it works fine, resulting in images like this:

This is what most people see (http://www.3dwonders.com/worldnewsscreensaver/screenshot1l.jpg)

However, on a certain small percentage of computers the text just comes out plain wrong, typically like this:

This is what the unfortunates see (http://www.3dwonders.com/images/glypherror.jpg)

A user sent me this image. I sent him a debug build loaded with diagnostics - checking return codes and calling glGetError everywhere - but no problems showed up.

So my question is: does he just have crappy video drivers, or can anyone think of a likely cause for what is shown? And a workaround!

He's running XP SP2, 1024x768, 16-bit, S3 video card:
Vendor = S3 Graphics, Incorporated
Renderer = ProSavage/Twister
Version = 1.1 2.40.116

He says he updated his drivers recently.

I put all the glyphs into a large texture (using glTexImage2D and glTexSubImage2D for each mipmap level) and then display with normal GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA blending.

Any assistance much appreciated!

Tom

rgpc
12-23-2004, 03:59 PM
I don't know anything about GetGlyphOutline but I will ask if there's a possibility that the font being used isn't installed? Are you checking for that? It looks like you are using Arial/Helvetica (which should be installed) - but I thought I'd ask anyway.

meanfox
12-23-2004, 06:23 PM
Yup, that's not it. Any other ideas?

jwatte
12-23-2004, 06:30 PM
We've had a lot of problems with OpenGL drivers from vendors that are not NVIDIA, ATI or Intel. So much so, that we wrote a DirectX 8 back-end for our application, and use that instead for other hardware. I've also had the experience that most other vendors don't fix bugs other than those totally blocking the absolutely most popular games.

V-man
12-23-2004, 07:16 PM
This is a windows GDI related problem if you are using GetGlyphOutline. You may need to call GDIFlush after some of these functions on NT systems. It could also be XP related.


So my question is: does he just have crappy video drivers, or can anyone think of a likely cause for what is shown? And a workaround! Yes that is a crap, but it could be something else.

meanfox
12-25-2004, 05:41 PM
Thanks. After reading up on GdiFlush I figured that perhaps my GDI and OpenGL were conflicting - I use double buffering. I had been using the DC from wglGetCurrentDC for my glyph code. I'm going to instead try using a DC from ::CreateDC("DISPLAY", NULL, NULL, NULL) to see if that helps for the people with problems. Won't know until my tester gets back to me. Certainly the code still works on my systems.

Does this sound like a good idea?

I don't need GdiFlush, I think, since I'm just using GetGlyphOutline rather than doing GDI rendering. But you may have pointed me in the right direction.

Merry Xmas -

Tom

Lars
12-27-2004, 03:38 PM
You should also try to output the data from GetGlyphOutline maybe in beautifull ASCII Art. This way you can see if it is GDI or OpenGL. If it is a problem with GDI you can try to use freetype (http://www.freetype.org/).

Lars