Archived

This topic is now archived and is closed to further replies.

how do I add cross hairs?

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m working on a walk through and I''d like to add crosshairs to the center of my screen. I figure one way would be to laod a 2D image but won''t that cover up excess space. Any way to load an just selected parts of an image whilst leaving some parts completely transparent or is there any better way? Any suggestions guyz

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
use DrawIndexedPrimitive if you are using dx, and just call it twice, one for each line. I''m sure OpenGL has a similar call.

if you want stylish crosshairs, use an alpha blended texture.

If you''re just using Windows GDI or Linux, then just draw lines to your backbuffer.

hope that helped.

Share this post


Link to post
Share on other sites
either a small texture, or a sub-part of a big texture, or plain lines/quads can be used depending on the type of quality u want the crosshair to be. But do take note of a related issue. U''d want to render the crosshair in orthographic projection, and it shud be rendered after the scene is rendered and preferably a cleared depth buffer, to ensure it ALWAYS appears.

Share this post


Link to post
Share on other sites