Finally got opengl working correctly. You can see where I updated the
grid in grid_agent() in grid_agent.cpp