moving objects


I want to move a 2D square, according to some inputs from the user like the x,y velocity . How do i do it ?

When you get user input, update some variables to keep track of the position and tell the OS to update the contents of the window, and in your rendering code, render the object at the correct position depending on the variables, you might want to have a peek at some OpenGL tutorials also.