On Wed, Oct 27, 2010 at 11:04 PM, Mike Wyatt <[email protected]>wrote:
> I'm rendering a hex map with a batched set of sprites (one per cell). The > batch looks pretty good, but on close inspection I can see that the pixels > are not rendered exactly as the source image. > > Here's a image with the original image and a small cropped view of a few > rendered sprites in the hex grid: > http://img830.imageshack.us/img830/812/hexes.png Are you sure you didn't create a multi-sample context and request anti-aliasing? That looks a bit like it could be anti-aliasing on the polygon edges. Also make sure that you disable both GL_LINE_SMOOTH and GL_POLYGON_SMOOTH, just in case something else had enabled them. > I'm guessing I either need to adjust the modelview transformation or change > some gl* setting. I've played around with GL_TEXTURE_MIN_FILTER and > GL_TEXTURE_MAG_FILTER and glHint, but haven't had any luck. > For testing, set both your MIN and MAG filters to GL_NEAREST, to prevent any chance of bilinear interpolation. How can I fix this? > If none of the above did the trick, then double check your math - you might have introduced rounding error somewhere... -- Tristam MacDonald http://swiftcoder.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
