How to draw a single pixel in dx8?
Ok... the title tells most of this. I have got my 3D-stuff working. I can see nice polygons with lighting etc... but I still don''t know how to draw a single pixel in dx8!
Any ideas?? Thanks!
Press any key to continue or any other key to quit...
Try to change D3DPT_TRIANGLELIST to D3DPT_POINTLIST in your DrawPrimitive call, experiment from there.
------------------
It''s me again!
------------------
It''s me again!
Thanks! That one helped me a bit, but isn''t it quite slow to draw pixels by this way? (I need to draw them a lot!)
Lol, drawing pixels separately is slow. I draw slpashscreen using D3DPT_POINTLIST. But there''s not extreme speed required, since it''s blitted just once.
Cant you just mess with the buffer data directly? Why in the name of god wouldnt they have some simple ReadPixel() and WritePixel() functions??
quote:Original post by MindFlayer
Thanks! That one helped me a bit, but isn''t it quite slow to draw pixels by this way? (I need to draw them a lot!)
G''day!
Yes it is slow, but ReadPixel() and WritePixel() (as someone else lamented the lack of) are orders of magnitude slower.
Locking the buffer stalls the rendering pipe, stalls are very bad. Using a point-list will get you (some) hardware acceleration. Most cards probably render points as 1-pixel triangles, so you can see how they wouldn''t be blindingly fast. There really isn''t much demand for it though.
If you batch up your list of points to be drawn each frame it probably won''t be too bad. It al depends how many points you''re drawing.
Stay Casual,
Ken
Drunken Hyena
The question I always ask here is:
What are you trying to do?
One person who asked this question was drawing curves, using 2000 points to get continuity, instead of using a line strip with 10-100 points.
Drawing a splash screen strikes me as something that could be done with a texture.
So - what exactly are you doing? Perhaps there is a much easier way...
What are you trying to do?
One person who asked this question was drawing curves, using 2000 points to get continuity, instead of using a line strip with 10-100 points.
Drawing a splash screen strikes me as something that could be done with a texture.
So - what exactly are you doing? Perhaps there is a much easier way...
I'm doing the famous plasma-effect which needs all pixels on the screen to be refreshed. This is naturally horribly slow so I might need to go on to lower resolution... I could also switch back to DX7 (=easy direct surface write) but I don't want to do that . Isn't there any better ways?
Edited by - MindFlayer on July 30, 2001 11:22:17 AM
Edited by - MindFlayer on July 30, 2001 11:22:17 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement