Archived

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

And again 2D in DX8

This topic is 5966 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 developing one project and soon I reallised, that I can''t geometricaly subdivide polys with holes into triangles, and the only way to draw concave polys with holes is to draw it''s shape and flood-fill it, but I can''t access individual pixels in DX 8!!! Does somebody know, how to plot pixels in DX8? It is also necessary to do many special effects like those swirly effects of Final Fantasy series. Can someone help?

Share this post


Link to post
Share on other sites
Plotting Pixels in DX 8 ? No problem! Just fill your vertex buffer with the points and draw them with DrawPrimitive (). But instead of setting D3DPT_TRIANGLELIST you set D3DPT_POINTLIST as the flag. That''s all there is to plot pixels in DX 8.

Share this post


Link to post
Share on other sites
Hi,
If these shapes w/holes are static, why not just use a textured poly instead of going through all the trouble of plugging individual points in?
As for those swirly effects ( not sure which ones you''re talking about ), you could probably get away with either drawing points or triangles with some particle system.

--Nairb

Share this post


Link to post
Share on other sites
It sounds like you are essentially talking about writing your own rasteriser using DX8. Seems weird...

One possibility - Let''s say you have a known shape and a known hole, but you can''t figure out how to create the equivalent set of subdivided triangles (is that right?) You could use the stencil buffer - draw the hole into the stencil buffer, then perform your stencil test so that the the stencil prevents the "hole" parts of the poly from being drawn.

This would accomplish the same effect as drawing a ton of individual pixels - that''s what the hardware is for!

Share this post


Link to post
Share on other sites
Look at my post in this thread, it explains a lot about pixel manipulation in DXG.

Here''s the link.
http://www.gamedev.net/community/forums/topic.asp?topic_id=45557

Sastraxi

Times of War
http://crystal-rain.cjb.net/

Share this post


Link to post
Share on other sites