View Full Version : Overlapping polygons and Ortho
I'm using an ortho projection to make it easy to draw to the screen (ie 10 = 10 pixels). However when I try to draw two polygons that overlap each other one is pushed down and right from where is should be. So the polygons still overlap, but one is pushed down and right.
12-12-2005, 02:40 PM
Overlapping polygons are not causing this. One polygon will not affect another.
You may have something else going on like depth testing, but I'm a bit skeptical.
Did you use matrix operations to move the polygons?
Transformations on the matrix are cumulative, you need to pushmatrix, translate, draw, then popmatrix.
Either that or loadidentity before each translate and forget the push & pop.
Depending on complexity you may want to avoid matrix manipulations for trivial stuff like single polygons.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.