I'm having a problem rendering my text in openTK. Any font I render below a size of about 33pt has strange lines running through it. Here is an example:
What could possibly be causing this? And how do I fix it?
Posted Friday, 22 February, 2008 - 08:47 by the Fiddler
Very strange, these lines run right through the glyphs, so they can't be texture interpolation/sampling artifacts (one would expect these to appear at the seams).
Which OS and video card is this? Does this still happen if you call GL.Scale (maybe 90% or 110% of the original size) just prior to rendering?
Edit: Ok, two more questions.
1) Do these appear at the same place every time? E.g. if you render "mmmmmm" or "tttttt", do the lines appear on all glyphs?
2) Do you cache text (i.e. call TextPrinter.Prepare before TextPrinter.Draw), or do you render uncached text (TextPrinter.Draw only)?
Posted Saturday, 23 February, 2008 - 06:12 by death_au
Interesting...
The problem was on the machines at uni, and I'm not 100% sure of their video card and I won't be able to check until Monday, but I do know they run Windows XP (SP2, I believe). When I ran it at home on my machine (Windows Vista, Nvidia GeForce 8400M GS) there were no artefacts at all... So it might be something to do with the drivers or something.... Which would mean I can't fix it, as I don't have admin access to the machines. All I can do is hope the artefacts don't appear on the machines my program is meant to be implemented on once finished...
Oh, and in case it matters, I DO call cache the text before drawing it.
Posted Saturday, 23 February, 2008 - 11:38 by the Fiddler
Ok, this *could* be a driver problem related to 1-channel alpha textures. Do check the video card at your uni's machines, it would be nice to collect a little more info.
I wouldn't worry too much about this, though - there are several possible workarounds that can be implemented inside OpenTK if this turns out to be the cause (e.g. detect the ailing drivers and use a luminance/rgba texture instead).
Posted Monday, 25 February, 2008 - 05:17 by death_au
The computers have NVidia GeForce 6600LE cards. I don't have access to the exact computer the problem was on (the room is temporarily closed), and I've tried it out on a couple of other machines without any artefacts. I guess it must've just been a problem with that PC. It's just odd that it only happened on that PC with text and nothing else...
Oh well, at least it appears that it's nothing to worry about.
Thanks.
Comments
Re: Font rendering artefacts
Very strange, these lines run right through the glyphs, so they can't be texture interpolation/sampling artifacts (one would expect these to appear at the seams).
Which OS and video card is this? Does this still happen if you call GL.Scale (maybe 90% or 110% of the original size) just prior to rendering?
Edit: Ok, two more questions.
1) Do these appear at the same place every time? E.g. if you render "mmmmmm" or "tttttt", do the lines appear on all glyphs?
2) Do you cache text (i.e. call
TextPrinter.PreparebeforeTextPrinter.Draw), or do you render uncached text (TextPrinter.Drawonly)?Re: Font rendering artefacts
Interesting...
The problem was on the machines at uni, and I'm not 100% sure of their video card and I won't be able to check until Monday, but I do know they run Windows XP (SP2, I believe). When I ran it at home on my machine (Windows Vista, Nvidia GeForce 8400M GS) there were no artefacts at all... So it might be something to do with the drivers or something.... Which would mean I can't fix it, as I don't have admin access to the machines. All I can do is hope the artefacts don't appear on the machines my program is meant to be implemented on once finished...
Oh, and in case it matters, I DO call cache the text before drawing it.
Re: Font rendering artefacts
Ok, this *could* be a driver problem related to 1-channel alpha textures. Do check the video card at your uni's machines, it would be nice to collect a little more info.
I wouldn't worry too much about this, though - there are several possible workarounds that can be implemented inside OpenTK if this turns out to be the cause (e.g. detect the ailing drivers and use a luminance/rgba texture instead).
Re: Font rendering artefacts
The computers have NVidia GeForce 6600LE cards. I don't have access to the exact computer the problem was on (the room is temporarily closed), and I've tried it out on a couple of other machines without any artefacts. I guess it must've just been a problem with that PC. It's just odd that it only happened on that PC with text and nothing else...
Oh well, at least it appears that it's nothing to worry about.
Thanks.