Original Post
Hello,
I'm trying to fill a vertex buffer with verts from an FBX file. However, nothing renders and I get this warning.
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.
I have also tried going at it this way.
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.
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.