And again 2D in DX8

Started by
4 comments, last by Halo Vortex 22 years, 8 months ago
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?
Advertisement
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.
visit DyingHour
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
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!
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials
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/
SastraxiTimes of Warhttp://crystal-rain.cjb.net/
Hi,

I have a drawn out answer in the other topic, please look there. You don''t have to draw your own pixels.
Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces", A third book on advanced lighting and materials

This topic is closed to new replies.

Advertisement