Jump to content
  • Advertisement
Sign in to follow this  
31337noob

how to make a rect.

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

Advertisement
if u just need a colored 2d rectangle:
with two triangles, made of transformed vertices which include data for a diffuse color

Share this post


Link to post
Share on other sites
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.

How much do you know about DX?

That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.

Share this post


Link to post
Share on other sites
Try to make use of the d3ddevice->clear() parameters and see if it fits your needs, but using vertices would be the way to go...

Share this post


Link to post
Share on other sites
ok i tried using colorfill and it didnt work right.

so, how would i make a box using vertices?


see, i am tring to make a progressbar.

Share this post


Link to post
Share on other sites
Quote:
Original post by kingnosis
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.

How much do you know about DX?

That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.


Actually, a triangle strip is pretty much pointless for one quad.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
Quote:
Original post by kingnosis
You're going to want a triangle strip. Take a look here for how to put two triangles together as a strip.

How much do you know about DX?

That's actaully a great tutorial all around, so if the code on that page doesn't make sense, take a look.


Actually, a triangle strip is pretty much pointless for one quad.


ok, so how would i do it?

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!