private void drawToZBuffer(Color colour, EdgeListNode[] edgeList){
		for(int y = 0; y < edgeList.length; y++){
			EdgeListNode node = edgeList[y];
			if(node == null) continue;

			int x = (int)node.leftX();
			float z = node.leftZ();
			float mz = ((node.rightZ() - node.leftZ()) / (node.rightX() - node.leftX()));

			while(x <= (int)Math.floor(node.rightX())){ //TODO round up?
				if(x < 0 || y < 0 || x >= width || y >= height) {x++;z += mz; continue;}

				if(z < zBuffer[y][x]){
					zBuffer[y][x] = z;
					colourBuffer[y][x] = colour;
				}
				x++;
				z += mz;
			}
		}
	}