Point Sprites....

Started by
2 comments, last by AngelForce 21 years, 4 months ago
I''m developing a particle engine right now and would like to use point sprites. However, I only found few tutorials about them and all of them lock the VB and then fill it with vertices, unlock it and draw the points(in general). I thought locking the VB when not necessary is bad(at the moment I''m using 2 triangles in one VB, which is only filled in the beginning -> a matrix transformation for each particle)....is there an other way to do this? Or is locking the VertexBuffer each frame is the best solution in this case?? Thanks for your answers! AngelForce -- If you find any mistakes, you''re allowed to keep ''em! ''When I look back I am lost.''
AngelForce--"When I look back I am lost." - Daenerys Targaryen
Advertisement
I''m sure locking and unlocking the VB one more time each frame won''t make too much of a difference.
APE
for a particle engine id say it would be better to lock fill unlock the vertex buffer each frame instead of setting a different matrix for each particles. cause particles could go in the thousands, and having a thousand calls to SetTransform is probably much more costly then calling Lock/Unlock once .

:::Al:::
[Triple Buffer V2.0] - Resource leak imminent. Memory status: Fragile
[size=2]aliak.net
Ok, thx for your answers!

AngelForce

--
If you find any mistakes, you''re allowed to keep ''em!

''When I look back I am lost.''
AngelForce--"When I look back I am lost." - Daenerys Targaryen

This topic is closed to new replies.

Advertisement