PDA

View Full Version : glTexImage2d produces different textures on Win2k and Linux RedHat 8 - WHY???



sansan
09-22-2004, 12:40 AM
Hello all!

I'm working on a cross-platform visualization application based on OpenGL.I use texture mapping to display text fragments:

1. I draw all font glyphs on an image (image parameters are the same on both OSs - size, BPP) --> resulting image is good on both Windows and Linux (I write it to a file and examine it with a graphic editor).

2. I pass the pixel data to glTexImage2d using absolutely the same parameters and then I display a test rectangle with a whole texture mapped onto it --> I've got a very strange problem: texture on WIndows looks OK, while on RH8, each glyph looks compressed in width by ~10% !!! It looks as if some resizing was applied, so some pixels in each glyph are simply lost. Therefore, text looks ugly on Linux :(

Does anybody have an idea why it behave this way on RH8?
Maybe there are some peculiarities for this kind of OS related to OpenGL textures...

I can provide you with snapshots of the source font bitmap and the resulting texture by mail if needed.

raoulduke
09-22-2004, 01:09 AM
Can this be some kind of a driver problem on linux?!
Maybe You should check your graphics settings

greetz

sansan
09-22-2004, 01:21 AM
I'm sorry, it was my mistake in image preparation routine, so it has nothing to do with gltexImage2d function. :p

Long live OpenGL texturezzz!

raoulduke
09-22-2004, 02:22 AM
yeah, and linux still rocks after all! :D