Jump to content
  • Advertisement
Sign in to follow this  
dxdotnet1

Triangle Fan+Vertex Buffer

This topic is 4835 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 have a terrain implemented using Quadtree and an triangle fan hwoever it doesnt use vertex buffer but i want to use it. However i got confuse on how to use it, I found it confusing on how to end rendering a single quad(using trangle fan) and proceed to the next quad. got my point? for example i got 2 quads, each is renderd by a triangle fan how can i specify in the buffer the this vert is the end for the rendering for the first quad and proceed rendering the triangle fan for the 2nd quad?

Share this post


Link to post
Share on other sites
Advertisement
whoa, triangle fans?

Use TRIANGLE STRIPS.

Create vertex buffers with the CreateVertexBuffer member of IDirect3DDevice9 and lock it with the Lock method, and copy your vertex data to the pointer it returns. Then unlock the buffer.

To draw, use DrawPrimitive instead of DrawPrimitiveUP and bind the buffer by calling the SetStreamSource method of IDirect3DDeivce9.

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!