Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Why does D3DXComputeBoundingBox keep crashing?

This topic is 4532 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 im using D3DXComputeBoundingBox, but it keeps crashing, and i can't work out what im doing wrong.
struct VERTEX{
   D3DXVECTOR3 pos;
   D3DXVECTOR3 norm;
   float tu;
   float tv;
};

VERTEX *pVerts;

if(SUCCEEDED(sphere->LockVertexBuffer(0, (void**)&pVerts))) {
	int numVerts=sphere->GetNumVertices();
		
	D3DXVECTOR3 vMin,vMax;
      //crashes here
	D3DXComputeBoundingBox((const D3DXVECTOR3*)pVerts,numVerts,D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1,&vMin,&vMax));
}

I've looked at multiple sources of code and they all are doing the same thing as me, but mine crashes.. What could I be possibly be doing wrong here? Thx!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!