Hi,
Im really flaky with DirectX, but maybe someone can help me figure out major differences between dx7 and 8 in terms of vertex buffer implementation?
I'm trying to implement a vertex cache class, and looking at old DX8 code I could create a vertex buffer with DYNAMIC flag to speed up uploading that buffer to video every frame, to be used for all dynamic geometry.
This is what dx8 flags look like:
pDevice->CreateVertexBuffer(maxVerts*stride, D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY|PROCESSING,
FVF,D3DPOOL_DEFAULT,&vBuf);
I have this working for dx7 now in Blitz, but I cant find the dynamic flag :/
desc.dwCaps = D3DVBCAPS_WRITEONLY
D3D7GraphicsDriver().Direct3D7().CreateVertexBuffer(desc , Varptr(VB) , 0)
How do i make sure my dx7 vertex buffer is in system memory and gets best options for dynamic access?
Would using DrawPrimitiveUP and passing array be any better than updating the vertex buffer and calling DrawPrimitiveVB?
Maybe someone has a pointer in a direction of some dx7 optimized rendering sources, I would really appreciate that.
TIA
Im really flaky with DirectX, but maybe someone can help me figure out major differences between dx7 and 8 in terms of vertex buffer implementation?
I'm trying to implement a vertex cache class, and looking at old DX8 code I could create a vertex buffer with DYNAMIC flag to speed up uploading that buffer to video every frame, to be used for all dynamic geometry.
This is what dx8 flags look like:
pDevice->CreateVertexBuffer(maxVerts*stride, D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY|PROCESSING,
FVF,D3DPOOL_DEFAULT,&vBuf);
I have this working for dx7 now in Blitz, but I cant find the dynamic flag :/
desc.dwCaps = D3DVBCAPS_WRITEONLY
D3D7GraphicsDriver().Direct3D7().CreateVertexBuffer(desc , Varptr(VB) , 0)
How do i make sure my dx7 vertex buffer is in system memory and gets best options for dynamic access?
Would using DrawPrimitiveUP and passing array be any better than updating the vertex buffer and calling DrawPrimitiveVB?
Maybe someone has a pointer in a direction of some dx7 optimized rendering sources, I would really appreciate that.
TIA