Archived

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

Menu Boxes in Direct3D 8.1

This topic is 5650 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 trying to make a game and I want to write a function that creates a menu box that I can write some words in. The function takes four parameters: left, top, width, height. The menu box uses one texture for the middle and then has border textures. How could I do this? Do I need to make 9 squares and somehow use a repeating texture them? Here is an example of what I want my menu boxes to be like: http://www16.brinkster.com/twkr/menuboxes.asp

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://msdn.microsoft.com/library/en-us/dx8_c/directx_cpp/Graphics/ProgrammersGuide/UsingDirect3D/Textures/Basic/TextureAddressModes/ClampTextureAddressMode.asp?frame=true

do that twice or even simpler:

Create a triangle fan with the 4 points as corners. Render it with u v coordinates for a texture that makes up the window look and it will be stretched across it. (make sure you set the world and view transforms to identity matricies)

Just two ways

-James

Share this post


Link to post
Share on other sites