problems with getting position projected to screen

i am trying to figure out the projection from world to viewport or screen…but no results. i want to render simple white line from one point to another but projected on the screen…i get 3d line which isnt what i want. can somebody look at the code i have and let me know what is wrong with it. thanks!

function OnPostRender(){ 

origin=cam.camera.WorldToViewportPoint(SceneControl.ReturnCameraTargetTransform().position);

    Debug.Log(origin.ToString());

    CreateLineMaterial(); 
    lineMaterial.SetPass(0); 

        GL.Begin(GL.LINES); 
        GL.Color(Color(1,1,1,1)); 

        GL.Vertex3(origin.x ,origin.y, 0);

        GL.Vertex3(origin.x+0.1 ,origin.y+0.1,0); 
        GL.End();
}

anyone?

You are getting the viewport coordinate of the point, but then passing that to GL.Vertex3 directly. GL.Vertex3 works with world space coordinates, so you need to use Camera.ViewportToWorldPoint to get the modified point back in world space again.