GL question- gluOrtho2D inexact alignment?

Posts: 1,232
Joined: 2002.10
Post: #16
Quote:Originally posted by arekkusu
I'm going to re-ask this question on mac-opengl, since it seems it isn't as "basic" as I thought.

Per Geoff Stahl's suggestion I have submitted this to RADAR as #3144695.

I isloated the code to a small project, which you can now download from the page given at the top of this thread.

Again, suggestions pointing out what I've done wrong are welcome, but at this point I think this is a bug in the ATI drivers.
Quote this message in a reply
Posts: 1,232
Joined: 2002.10
Post: #17
Since this bug has been discussed recently in other threads, I decided to make a better example of the problem.

There is a new sample project available at:

This project draws a bitmap using Quartz and as an OpenGL texture side by side, and shows you the difference.

This doesn't show all of the possible variations, since it is only using one 256x256 texture, but you can toggle filtering on and off and see the result very clearly.

You can also see recursive effects of the problem, such as you would get when texturing through a chain of multiple offscreen contexts.
Quote this message in a reply
Post: #18
I ran into the same thing at one point. Changing all my glOrtho calls from glOrtho(0, W, H, 0, -1, 1) to glOrtho(0, W - 0.05f, H - 0.05f, 0, -1, 1); and then drawing on regular integer coordinates seems to have worked fine for me so far. I've tested it on various ATi cards and at various resolutions. I haven't had the chance to test this out on non-ATi cards yet though.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  gluOrtho2D Problems Nick 15 5,552 Sep 6, 2004 07:06 PM
Last Post: Nick