How to draw a single point in Direct3D without using vertex buffer.
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!
hello there!
iirc you can use DrawPrimitiveUP(D3DPT_POINLIST,....)
DrawPrimitiveUP method doesn''t require a vertexbuffer
iirc you can use DrawPrimitiveUP(D3DPT_POINLIST,....)
DrawPrimitiveUP method doesn''t require a vertexbuffer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement