Help to display a 3d customized surface with opengl?

Surface can be expresed like that z=f(x,y)=xx+yy;

Including GL_FILL and GL_LINE two modes and
it responds to the mouse and keyboard message to adjust viewangle and scale.

Also, I want that is a contour with a color legend at one side to express the z height.

Could you help me ?