how to render line between gui element and mouse position

i am trying to use OpenGL to render line between gui element and mouse position.

i am using this:

    GL.Begin(GL.LINES);
     GL.Color(Color(1,1,1,1));
     //GL.Vertex3(10,10,1);
     GL.Vertex3(Input.mousePosition.x,Screen.height-Input.mousePosition.y,1);
     GL.Vertex3(100,100,1);
    GL.End();   

and it does nothing, if i use the commented line instead the line with mousposition i get the line but in 3d space, this isnt what i want and i guess that it has to be something with screen space... can somebody help me how to do it?

There are several scripts on the wiki that might help fix yours, or you can use their's.

http://www.unifycommunity.com/wiki/index.php?title=VectorLine

Requires Unity Pro


http://www.unifycommunity.com/wiki/index.php?title=DrawLine