I must do a 2d editor with opengl.
I must have a panel with a texture that occupy all the screen and over this panel i must draw line and a disk(a filled 2d circle).
I wish draw the panel at z = 0 and the lines and disk at z = 0.2 or 0.3.
may be is a good solution?
or there is a better solution?
and for the picking ?
what sense have a ray in a 2d application?
What you sugest sounds fine.
For 2D drawing you could disable depth testing (GL_DEPTH_TEST) then set all z-value to 0 - this will then draw like a normal GDI windows.
What are you picking? If it is the line gluunproject will probably struggle so I would simply use cpu caclulations (if that is allowed - I is assume this is some sort of assignment)