How to draw a single point in Direct3D without using vertex buffer.

Started by
1 comment, last by robert_s 21 years ago
Hi! I need to know how to render a single point on screen without using Vertex Buffers in Direct3D. Say I have this data: struct POINTVERTEX { D3DXVECTOR3 v_pos; // Vertex XYZ position DWORD color; // Color of vertex }; #define D3DFVF_POINTVERTEX ( D3DFVF_XYZ | D3DFVF_DIFFUSE ) POINTVERTEX pPoint; pPoint.v_pos = D3DXVECTOR3( 100.0f, 100.0f, 0.0f ); pPoint.color = D3DCOLOR_COLORVALUE( 1.0, 0.0, 0.0, 1.0 ); How would you guys write the render procedure in Render()? I just couldnt figure out how to use DrawPrimitive( POINTLIST.....) without actually using Vertex buffer which I dont want to use in this case. I am sure it must be max two lines of code!! Please let me know. THX!
Advertisement
hello there!

iirc you can use DrawPrimitiveUP(D3DPT_POINLIST,....)

DrawPrimitiveUP method doesn''t require a vertexbuffer
OK THX. I t works!

[edited by - robert_s on April 18, 2003 8:24:47 PM]

This topic is closed to new replies.

Advertisement