@Override
	public void drawOpenGl() {
		this.height = (int) Math.sqrt(RAM.MAX_LENGTH / 2);
		this.width = 2 * this.height;
		for (int i = 512; i < RAM.MAX_LENGTH; i++)
			if (ram.memory_count_read[i] > max_read)
				max_read = ram.memory_count_read[i];

		for (int i = 512; i < RAM.MAX_LENGTH; i++)
			if (ram.memory_count_write[i] > max_read)
				max_write = ram.memory_count_write[i];

		glViewport(0, 0, getWidth(), getHeight()); // 64*32 is the exact display
		glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
		glClear(GL_COLOR_BUFFER_BIT);
		glMatrixMode(GL_PROJECTION);
		glLoadIdentity();
		gluOrtho2D(0.0f, width, 0.0f, height);
		glMatrixMode(GL_MODELVIEW);
		glPushMatrix();

		for (int y = 0; y < height; y++)
			for (int x = 0; x < width; x++) {
				if ((x) + width * (y) == cpu.getRegister(19))
					drawPC(x, y);
				else
					drawWhitePixel(x, y);
			}

		glPopMatrix();
	}