View.draw2d(GL_POINTS, pts) on ATI with AA
-
I just came across something odd. I'd been working on a tool - using my home computer with an nVidia card. Everything working fine. Drawing a series of points on screen.
But when I tested it at work - nothing appeared. Cut a long story short, when usingview.draw2d(GL_POINTS, pts)on an ATI card with AA on, the X and Y co-ords must be in the centre of the pixel.So instead of
[20, 30, 0], one must add half a pixel:[20.5, 30.5, 0]to ensure it's drawn on all cards.My computer at work had an ATI Radeon 2X something something - latest drivers etc. Windows7 64bit. I tried with my old computer at home, Vista 32bit, ATI Radeon 9800 - older drivers - same issue.
When I turned AA off the points where drawn fine - but it's only when AA was on.nVidia cards I tested draw the points no matter what.
Seeing how this appear ATI cards in general, not just one model or driver version - is it ATI's implementation that's bugged, or could it be something in SketchUp?
Test code:
class PointTest def onLButtonUp(flags, x, y, view) view.invalidate end def draw(view) t = Time.now 32.times { |j| 32.times { |i| view.draw2d(GL_POINTS, [100+i,100+j,0]) # This is not drawn with ATI and AA. view.draw2d(GL_POINTS, [100.5+i,200.5+j,0]) # This works in all cases. } } puts "Point Fill Test; #{Time.now - t}" end def deactivate(view) view.invalidate end end # class -
This happens with other constants? would it happen the same with GL_QUADS or GL_LINE_LOOP?
-
Yea, think so.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement