Jump to content
  • Advertisement


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


Dynamic Vertex Buffer

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

ok I use
hr =D3DD->CreateVertexBuffer(MAX_PARTICLES * (sizeof(D3DVertex) * 6),D3DUSAGE_DYNAMIC,
to create a dynamic VB and
struct D3DVertex
	float x,y,z;
	DWORD color;
	float u,v;

	D3DVertex *temp;
	hr = Vertex_Buffer->Lock(0,0,(void **)&temp,D3DLOCK_DISCARD);
	if (FAILED(hr))
		return 1;
to fill it. My problem is my program acts as though the VB is not being cleared. Is there something else I should be doing. The example I read in the documentation only shows how to lock it. My version is almost exatcly like it except a different struct for "temp". Any help would be great. Thanks.

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!