mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +03:00
feat(gx): sync index buffer in d3d backend
This commit is contained in:
parent
38380ebc35
commit
6723f810ed
@ -950,7 +950,18 @@ void CGxDeviceD3d::IStateSyncEnables() {
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::IStateSyncIndexPtr() {
|
||||
// TODO
|
||||
if (!this->m_primIndexDirty) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->m_primIndexDirty = 0;
|
||||
|
||||
auto d3dIndexBuf = static_cast<LPDIRECT3DINDEXBUFFER9>(this->m_primIndexBuf->m_pool->m_apiSpecific);
|
||||
|
||||
if (this->m_d3dCurrentIndexBuf != d3dIndexBuf) {
|
||||
this->m_d3dDevice->SetIndices(d3dIndexBuf);
|
||||
this->m_d3dCurrentIndexBuf = d3dIndexBuf;
|
||||
}
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::IStateSyncVertexPtrs() {
|
||||
|
@ -220,6 +220,7 @@ class CGxDeviceD3d : public CGxDevice {
|
||||
int32_t m_d3dIsHwDevice = 0;
|
||||
D3DDISPLAYMODE m_desktopDisplayMode;
|
||||
D3DFORMAT m_devAdapterFormat;
|
||||
LPDIRECT3DINDEXBUFFER9 m_d3dCurrentIndexBuf;
|
||||
uint32_t m_deviceStates[DeviceStates_Last];
|
||||
|
||||
// Virtual member functions
|
||||
|
Loading…
Reference in New Issue
Block a user