Original Post
Hello fellow GL coders! I have a question, something I''ve been puzzling over for quite some time...Of the things I hope to master in OpenGL, among them is the ability to plot things on the screen with pixel precision. All that I know I have to work with is putting stuff out in 3 space in front of the camera, and TRYING to line it up. I actually made my own little GL_Cursor by trial and error of trying to find the right value to scale the cursor out from the center by, and finally got something that looks right.
Of course, there''s a problem with this - If you wanted to render multiple things with pixel precision, that could possibly obscure each other, one or the other may not be rendered, being covered up by the other. As such, one might have to find several different scalars, for several different layers of items to be shown. For example, say you had a menu; 3D text in front of the camera, and a GL_Cursor. If you had the text and the cursor at the same depth, they could obscure each other, so you''d have to move one of them (probably the text) back a little to a slightly different depth, and that would then require a different scaler value to bright it out from the center.
Is there a better way to do this? And is there a general formula that takes the viewing frustrum and the depth into account to find the right scalar value? Because until now, I''ve just used trial and error, which takes time and may not be completely accurate.
Thank you very much for your time!
- Danny McCue