Sign in to follow this  

[DX9] Point Sprite Code to Triangle List

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

This topic is 2542 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this