Locating Opengl rendering bug