Skip to main content
GameDev.net gamedev.net
🔒 Locked

Primitive on top

Started by H4ck3r Dec 4, 2002 at 9:25 AM 1 replies 200+ views
Original Post
H4ck3r
H4ck3r
How can i make a primitive that stays on top of the screen (like a mouse cursor), even when the camera moves. I DO NOT want to use DDraw, just primitives or something. How can I do this?? 10x...
Greven
Greven
I would think the easiest way would be to disable z buffer drawing, the draw it last. That way everything that you''ve already drawn would remain intact and you could simply draw it on top. Unless you want a 3D mouse cursor, you could also switch to ortho view and draw a simple 2D quad to the screen.

Note: None of this has been done by me. I understand the concepts, but have never been able to complete a 3D game

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
CrazedGenius
CrazedGenius
search the docs for D3DFVF_XYZRHW - this will allow you to set vertices in screen coordinates that are independent of the view transformations. Great for cursors, 2D elements, etc.

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.