Archived

This topic is now archived and is closed to further replies.

flying_c

i want know how I can draw a point (function)

Recommended Posts

flying_c    122
i am a biginner,,,I am learning dx8,,I have a lot of questions at learning dx8. one:i want to draw a dot by using dx8,but i dont know the function,I hope you help me! thank you,,,

Share this post


Link to post
Share on other sites
pangplast    150
Create a texture. Lock the texture. Set a bunch of numbers on locations (A+RGB)) in memory. Unlock and draw the texture using the D3DXSprite interface.

There might be a "putpixel" type function but I don''t remember it. Search for if you don''t want to do it manually.

This is one way.. maybe there are better ways but i don''t know them.

.Pangplast

Share this post


Link to post
Share on other sites
Giallanon    1893
To draw point, use DrawPrimitive specifyng D3DPT_POINTLIST as the
first parameter.
You''ll have to set a vertex buffer with the point(s) coordinate
in 3d. To render a 2d point simple put z=0 and rhw=1.0f

If you don''t know what rhw and vertex buffer are, you better read
the dx8 SDK so to learn how to play with buffers.

Share this post


Link to post
Share on other sites