Jump to content
  • Advertisement
Sign in to follow this  
DJTN

[DX9] Point Sprite Code to Triangle List

This topic is 2760 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've been having some issues with clipping and my Point Sprite particle engine. I've gone through my last issue with using Point Sprites and I've decided to use Triangle List instead but after a couple of days of research I'm more confused than anything about how to convert my existing code.

How can convert my pointsprites code to use triangle list?

I have a structure for my point sprites (particles)


public struct PointVertex
{
public Vector3 v;
public float pointSize;
public Vector4 color;
public static readonly VertexFormats Format = VertexFormats.Position | VertexFormats.PointSize | VertexFormats.Diffuse;

};


When rendering (drawing) I use my vertex buffer in the type of this struc, lock the buffer, update postion, color , size etc.. Unlock, then I call the Device.DrawPimitives using the PointList primitive Type.

If anyone could point me in the right direction or offer some advice, it'd be greatly appreciated.

Cheers,
Dj

Share this post


Link to post
Share on other sites
Advertisement
Strange that no one wanted to help. I eventually ran up on this article here:
http://www.gamedev.net/reference/articles/article1972.asp

For any of you having to transition your particle code from Point Sprites to Triangle List or Strips this article will get you going in the right direction.

Good Luck,
Dj

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!