Jump to content
  • Advertisement
Sign in to follow this  
ultim

no point sprites from VB

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

When I render point sprites from a vertex buffer, only one single sprite gets drawn. However, if I use almost the same code to render from an array (a user pointer), everything is fine. I'm using managed directx. Here's the code: verts = new CustomVertex.PositionColoredTextured[numNewParticles]; ...fill verts array with data... VB.SetData(verts, 0, LockFlags.Discard); // this works fine Device.SetStreamSource(0, VB, 0); Device.DrawUserPrimitives(PrimitiveType.PointList, numNewParticles, verts); // this only renders one particle Device.DrawPrimitives(PrimitiveType.PointList, 0, numNewParticles); What can possibly be the problem? Thanks for your help in advance

Share this post


Link to post
Share on other sites
Advertisement
update:

// this works fine
Device.DrawUserPrimitives(PrimitiveType.PointList, numNewParticles, verts);

// this only renders one particle
Device.SetStreamSource(0, VB, 0);
Device.DrawPrimitives(PrimitiveType.PointList, 0, numNewParticles);

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!