Original Post
When I declare my array with a constant:
sVertex Verts[36];
then this code runs smooth:
// Create the vertex buffer and set data
g_pD3DDevice->CreateVertexBuffer(sizeof(sVertex)*36, 0, \
VERTEXFVF, D3DPOOL_DEFAULT, &g_pVB);
g_pVB->Lock(0,0, (BYTE**)&Ptr, 0);
memcpy(Ptr, Verts, (sizeof(Verts)));
g_pVB->Unlock();
When I declare my array dynamically, however:
sVertex* Verts = new sVertex[(m_Elf.FaceCount*3)];
It doesn''t fly even though I use the exact same size of array - > 36:
Why?