Archived

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

Domenic

Point lists in D3D8 (Using DrawPrimitiveUP)?

Recommended Posts

I have almost completed my 2d-with-D3D engine, and I realized a had nice support for surfaces, fonts, and backgrounds but (doh!) no pixel plotting or line drawing! *SLAP* So I figure I sould use point and line lists, since they are faster than direct manipulation of the bits (right???) And I figure to use DrawPrimitiveUP (DrawPrimitive w/o vertex buffers), because the number of points/lines I want to draw varies per frame, and I don''t want to recreate the vertex buffer each frame, or set a maximum limit & waste memory. So I get a nice system where each call to DrawPixel/DrawLine pushes a vertex (or two vertices) onto their respective vector<>s. Cool, right? But when I go to draw them, only the lines work out. Yuck! No points in a 2D engine??? I think it may have to do with the new "point sprite" thing in D3D8. That''s great, but I just want a little pixel! BTW, the lines work beautifully. Color blending from each point, alpha blending, EZ and FUN!! Maybe I should just manipulate the bits? All this pushing onto vector<>s, etc. must be less efficient than just a simple memory write... Don''t you think? Any help would be nice... Example code even nicer ... -Domenic- Geek^n

Share this post


Link to post
Share on other sites