Jump to content
  • Advertisement
Sign in to follow this  
ankhd

To Use or Not to Use Mesh's or Textures

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

Hey all, I have decided to make a interface, and I'm going to make a EditBox first, this editbox needs to be stretched and scaled to fit what the programmer set when they set it up, and other things. now I'm woundering what should I use, should I go for mesh's so I can make modifications like change the verties and materials. Or should I use a sprite and textures. with the textures can I use them like a old ddraw surface if so how does one get a pointer to the bits because I want to use a base texture and scan the segments needed to build up this editbox then with the corrners and the straight bits I could render a edit box at any size to the back buffer can this be done in d3d now. and how THANKS ALL Ankh.

Share this post


Link to post
Share on other sites
Advertisement
Meshes are probably overkill here, but you could probably get some quite nifty effects via this route.

Typically sprites or "T&L Quads" will be the method of choice. For edit boxes I just used a 3x3 grid of quads that were stretched accordingly. No need to manually mess with the textures - just the underlying geometry.

Don't go down the DirectDraw-in-Direct3D route. Just don't. [grin]

Jack

Share this post


Link to post
Share on other sites
Yes I was a DirectDraw person lol,
but if I scale a quad then the editboxt texture will come out elongated a bit may look funny.

Share this post


Link to post
Share on other sites
Thats why he said 3x3 Grid. [smile]

The center quad is the actual stretched part, you can just use a tileable texture or just colors to fill this. The other quads are the corners, top, bottom, left and right of the editbox.

The corners would all be the same size and have (for example) a corner texture on them. The top and bottom would stretch to be the same width as the center quad and use a texture that tiles horizontally. The left and right would be the same height as the center quad and have a texture that tiles vertically.

Sorry if this is a bit confusing.... just woke up.

Share this post


Link to post
Share on other sites
I'm now thinking of going down the mesh route, why you may ask, well I like the idea that I could scale it and rotate it and also I could have little holograms projected up with less animation as it could be done with matrix math.
And I can change the material.
Is this a good reason.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!