• Advertisement

Archived

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

Clicking on an image and vertex buffers

This topic is 5061 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

Hi guys, I''m realtively new to DirectX programming and I''ve got a few questions: If I have an image I want to use as a button in a game, do I *really* have to use D3DXIntersect to detect if the mouse click is on the button? And would it be better(performance and code-wise) to have 2 vertex buffers, one for the in-game 2D UI interface and the other for the 3D graphics? Thanks alot

Share this post


Link to post
Share on other sites
Advertisement
If you image is just on the screen, like in an ortho projection then you should know where its at, just do a couple if''s on the mouse position and the image. As far as using more then one vertex buffer. I use opengl but im pritty sure then you should have lots of vertex buffers for your game. Not one huge one. So adding another for the gui seems right.

Share this post


Link to post
Share on other sites

  • Advertisement