i wrote this code while learning openGL (2.x)