On Mar 24, 5:26 pm, Jonathan Hartley <[email protected]> wrote: > I'm wondering whether it's possible to compensate for non-square pixels. > > Using vector graphics drawn from OpenGL, in some resolutions my circles > are wider than they are tall, and in other resolutions they are taller > than they are wide. At my LCD's max, native resolution, the circles are > perfect, and to confirm this, the aspect of this max screen resolution > matches the physical measurements of the screen. Other resolutions vary > in aspect ratio from 1.25 up to 1.7, with a corresponding distortion to > the graphics onscreen. > > I started out trying to compensate for non-square pixels when running in > lower resolutions , by setting my gluOrtho2D params. I assume that the > max available resolution on a display comprises square pixels, and then > compare the current resolution's aspect ratio to this. This works great, > in both fullscreen and windowed mode. > > However, then I switched from Linux to Windows, and on the same > hardware, this time the drivers provide modes which have 'black bars' > down the sides. So the reported resolution does not use the whole screen > real estate. This throws off my 'compenation' calculation, and in fact > pretty much makes it redundant, so I'd like to stop performing this > pixel aspect correction in this case. But I've no idea how to detect > this circumstance from software. > > I guess I could have a manual tweak for pixel aspect ratio, that the > user could set. Meh. > > I assume automating this can't reliably be done, unless someone has > information to the contrary. Ideas, thoughts, etc, welcome. > > Jonathan > > -- > Jonathan Hartley Made of meat. http://tartley.com > [email protected] +44 7737 062 225 twitter/skype: tartley
I found the switch in my driver config that turns these black bars off, so all resolutions now use the full screen real estate. So now my calculations work great all the time. I guess I just need to provide users with a toggle to turn off this compensation, in case they are using a mode which doesn't use all the screen real-estate (or in case their largest screen resolution doesn't use square pixels.) Good enough. Sorry for the noise. -- 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.
