texture scaling wierdness at the middle of the screen

Started by
0 comments, last by O-san 14 years, 1 month ago
I'm doing 2D rendering in OpenGL on top of a 3D scene. I've set things up for 2D rendering and it works pretty well. I'm rendering text by rendering a quad which is textured with a grayscale alpha texture for each character. So I have the char rendered in white (anti-aliased grayscale) on a black background and I load this into an alpha texture, then I render, say, a red quad with that texture and I get a nice red letter. This is working great. Initially I experienced scaling problems where it turned out the quad was not the exact same size as the texture which resulted in GL scaling the texture which was not what I wanted. This produced all sorts of artifacts from the scaling. So I'm now ensuring the quad size matches the texture size so there's no scaling and it looks really nice. What's wierd though is that as the text moves around the screen it looks great, but there's this place half way down the screen vertically where, when the text passes through that, if you move it slowly and watch carefully you'll see a very brief moment where it does some sort of scaling. The text momentarily (at a particular y position) changes slightly in size and shows some of the scaling artifacts I saw previously. Its minor and you have to watch for it. I'm curious, though, is there some sort of position dependent thing for textures that might cause this? Anywhere else on the screen it looks great. I'm creating a display list within which I'm binding the texture, setting the texture parameters, and then drawing the quad (at 0,0 1,0 1,1 0,1). So when I render I just call this display list. And it works great except for the middle of the screen vertically. There's something position dependent it seems that causes this glitch at that place in the screen. Any ideas? Note that the quad size/texture size/etc does not vary. Its in a display list and I'm just calling this, after having set a different transform of course to position it.
Advertisement
Maybe it's some kind of problem originating from pixel correctness.

http://msdn.microsoft.com/en-us/library/dd374282%28VS.85%29.aspx
http://www.opengl.org/resources/faq/technical/transformations.htm

This topic is closed to new replies.

Advertisement