Vertex buffer
I want to change the vertices properties in the vertex buffer, but this work ONLY ONCE, then the "pVertices[j].p *= xVariable;" line do nothing.
What's wrong?
Thanks: George Varga
The Code for create:
--------------------
m_pXFileObject = new CD3DMesh();
m_pXFileObject->Create( m_pd3dDevice, strXFileBuffer );
m_pXFileObject->SetFVF( m_pd3dDevice, D3DFVF_MODELVERTEX );
The Code for manage:
--------------------
m_pXFileObject->GetSysMemMesh()->GetVertexBuffer( &pVB );
dwNumVertices = m_pXFileObject[x]->GetSysMemMesh()->GetNumVertices();
pVB->Lock( 0, 0, (BYTE**)&pVertices, 0 );
for( DWORD j=0; j < dwNumVertices; j++ )
{
pVertices[j].p *= xVariable;
}
pVB->Unlock();
pVB->Release();
[edited by - GeorgeV on August 30, 2002 3:10:43 PM]
Either your code was cut off or your for-loop cannot do something because the counter ist not incremented.
Thanks for the answer.
The increment for "for" was correct, but the HTML list not show correct the for increment line. I changed.
George Varga
[edited by - GeorgeV on August 30, 2002 3:13:17 PM]
The increment for "for" was correct, but the HTML list not show correct the for increment line. I changed.
George Varga
[edited by - GeorgeV on August 30, 2002 3:13:17 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement