Fast pixel plotting?

Started by
26 comments, last by bartiss 20 years, 4 months ago
Thanks for all the answers!

All I wanted to do is to create some 2D effects such as lighting,fire,flares,morphing etc.

I know enough about arithmetics but I lacked technical experience!

Advertisement
Well, I''d recommend figuring out exactly what to do and then write a good algoritm that does it.

DON''T USE A SETPIXEL FUNCTION !!!

You need to lock the surface once and then run the algorthm that does the effekt. By using a setpixel function you will loose alot of speed, well, you could just make the funktion ''inline'' and gain some speed but it will still multiply y with the pitch and such things drain speed if you do them alot. Better to do it all at once. And then ofcourse read from smem, write to vmem.

/MindWipe

"To some its a six-pack, to me it's a support group."
D3D: Point List?

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
quote:Original post by Pipo DeClown
D3D: Point List?

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..

Yeah that''s what I was on about.

So anyone have any figures on which is faster for < 1000 px? Locking the buffer or drawing a point list primitive?
Special thanks to UltimaX!

The code you sent me works much better than I actually needed
And it''s quite all-purpose.

Thanks again
No problem, I try to help as much as I can
Glad you found it useful, good luck on your project.

-UltimaX-

"You wished for a white christmas... Now go shovel your wishes!"
quote:Original post by Pipo DeClown
D3D: Point List?


You are mistaken, POINTSTRIPS and INDEXBUFFERS are faster.... no wait.

</sarcasm>
Editor42 ...builds worlds
quote:Original post by Coincoin
quote:Original post by Pipo DeClown
D3D: Point List?


You are mistaken, POINTSTRIPS and INDEXBUFFERS are faster.... no wait.



Am I the only one not getting this? Anyhow, sarcasm is not nice and should be banned. Muhaauhahaa!

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

This topic is closed to new replies.

Advertisement