mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(d3d): update CGxDeviceD3d::ISceneBegin
This commit is contained in:
parent
9c0c0c64ba
commit
2a02ba3657
1 changed files with 15 additions and 4 deletions
|
|
@ -1311,17 +1311,28 @@ void CGxDeviceD3d::ICursorDraw() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGxDeviceD3d::ISceneBegin() {
|
void CGxDeviceD3d::ISceneBegin() {
|
||||||
|
if (!this->m_context) {
|
||||||
|
auto result = this->m_d3dDevice->TestCooperativeLevel();
|
||||||
|
if (result == D3DERR_DEVICENOTRESET) {
|
||||||
|
this->IReleaseD3dResources(0);
|
||||||
|
D3DPRESENT_PARAMETERS d3dpp;
|
||||||
|
this->ISetPresentParms(d3dpp, this->m_format);
|
||||||
|
result = this->m_d3dDevice->Reset(&d3dpp);
|
||||||
|
if (result == D3D_OK) {
|
||||||
|
this->IStateSetD3dDefaults();
|
||||||
|
// TODO: CGxDeviceD3d::ICursorClip
|
||||||
|
// TODO: this->NotifyOnDeviceRestored()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this->m_context) {
|
if (this->m_context) {
|
||||||
this->ShaderConstantsClear();
|
this->ShaderConstantsClear();
|
||||||
|
|
||||||
if (SUCCEEDED(this->m_d3dDevice->BeginScene())) {
|
if (SUCCEEDED(this->m_d3dDevice->BeginScene())) {
|
||||||
this->m_inScene = 1;
|
this->m_inScene = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGxDeviceD3d::ISceneEnd() {
|
void CGxDeviceD3d::ISceneEnd() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue