modified square and opengl to only use 1 instance of square