I have managed to reduce the tearing or stuttering by configuring my Intel HD graphics 510 card to run at optimal performance and used vertical sync. thus I have concluded that the tearing/stuttering I am experiencing is hardware depended. I will build and test this code on more powerful GPUs and compare the results.