@Override
		public void run() {

			while (true) {
				try {

					Job j = jobs.poll();
					if (j == null) {
						waiting = true;
						synchronized (waiter_finish) {
							waiter_finish.notify();
						}
						while (j == null) {
							synchronized (waiter_begin) {
								waiter_begin.wait();
							}
							j = jobs.poll();
						}
					}
					waiting = false;

					try {
						switch (j.mode) {
						case POINTS:
							rasterisePoints(j);
							break;
						case LINES:
							rasteriseLines(j);
							break;
						case TRIANGLES:
							rasteriseTriangles(j);
							break;
						default:
							throw nope("Bad raster mode.");
						}
					} finally {
						// this thread is done with it
						j.wb.release();
					}

				} catch (Exception e) {
					e.printStackTrace();
				}
			}

		}