Skip to main content
gamedev.net
🔒 Locked

ID3D10Buffer warning

Started by azrin 1 reply 2.3k views
Original Post
azrin
azrin
Hello,

I'm trying to fill a vertex buffer with verts from an FBX file. However, nothing renders and I get this warning.

Quote:

D3D10: WARNING: ID3D10Buffer::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS ]


So I simplified and just tried to fill it with a triangle, as in Tutorial 2 of the SDK. I get the same warning. Google doesn't turn up anything.

			mesh_vert vertices[] =			{			D3DXVECTOR3( 0.0f, 0.5f, 0.5f ),			D3DXVECTOR3( 0.5f, -0.5f, 0.5f ),			D3DXVECTOR3( -0.5f, -0.5f, 0.5f ),			};			D3D10_BUFFER_DESC bd;			bd.Usage = D3D10_USAGE_DEFAULT;			bd.ByteWidth = sizeof( mesh_vert ) * 3;			bd.BindFlags = D3D10_BIND_VERTEX_BUFFER;			bd.CPUAccessFlags = 0;			bd.MiscFlags = 0;			D3D10_SUBRESOURCE_DATA InitData;			InitData.pSysMem = vertices;			tempDevice* mDev             = mDev->getPtr();			mDev->getDevice()->CreateBuffer( &bd, &InitData, &mVertBuffer );


I have also tried going at it this way.

			if(FAILED(mDev->getDevice()->CreateBuffer(&bd, NULL, &mVertBuffer))) logFile << "Failed to create vert buffer." << std::endl;			mesh_vert* v = NULL;			mVertBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&v);			for(int i = 0; i < iNumOfVerts; i++) {				KFbxVector4 mVert        = mVertices;				v.v.x                 = (float)mVert[0];				v.v.y                 = (float)mVert[1];				v.v.z                 = (float)mVert[2];			}			mVertBuffer->Unmap();


Could somebody point me in the right direction? This is really baffling me. It appears to work without the warning in the SDK tutorial.

Thank you.
Demirug
Demirug
This is the first time I see this warning. But it says that the warning is related to SetPrivateData. Do you call this function?
Have you checked with the debugger which call gives you this warning?
Tordin
Tordin
Try to run the app in PIX. it is realy usefull. from there you can read the data and get a better clue!
"There will be major features. none to be thought of yet"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.