Jump to content
  • Advertisement


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


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

This topic is 5635 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

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!

Share this post

Link to post
Share on other sites
hello there!

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

DrawPrimitiveUP method doesn''t require a vertexbuffer

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!