mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-18 02:52:47 +03:00
feat(gx): implement scene clear in d3d backend
This commit is contained in:
parent
c0d256f0a0
commit
56b24bfb3c
@ -75,6 +75,7 @@ class CGxDevice {
|
||||
int32_t intF5C = 0;
|
||||
int32_t m_windowVisible = 0;
|
||||
int32_t intF64 = 0;
|
||||
int32_t intF6C = 1;
|
||||
CBoundingBox m_viewport;
|
||||
C44Matrix m_projection;
|
||||
C44Matrix m_projNative;
|
||||
|
@ -1595,6 +1595,30 @@ void CGxDeviceD3d::PoolSizeSet(CGxPool* pool, uint32_t size) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::SceneClear(uint32_t mask, CImVector color) {
|
||||
CGxDevice::SceneClear(mask, color);
|
||||
|
||||
if (!this->m_context) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t flags = 0x0;
|
||||
if (mask & 0x1) {
|
||||
flags |= 0x1;
|
||||
}
|
||||
if (mask & 0x2) {
|
||||
flags |= 0x2;
|
||||
}
|
||||
|
||||
if (this->intF6C) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
D3DCOLOR d3dColor = color.b | (color.g | (color.r << 8) << 8);
|
||||
|
||||
this->m_d3dDevice->Clear(0, nullptr, flags, d3dColor, 1.0f, 0);
|
||||
}
|
||||
|
||||
void CGxDeviceD3d::ScenePresent() {
|
||||
if (this->m_context) {
|
||||
CGxDevice::ScenePresent();
|
||||
|
@ -244,6 +244,7 @@ class CGxDeviceD3d : public CGxDevice {
|
||||
virtual void CapsWindowSize(CRect& dst);
|
||||
virtual void CapsWindowSizeInScreenCoords(CRect& dst);
|
||||
virtual void ScenePresent();
|
||||
virtual void SceneClear(uint32_t mask, CImVector color);
|
||||
virtual void Draw(CGxBatch* batch, int32_t indexed);
|
||||
virtual void PoolSizeSet(CGxPool* pool, uint32_t size);
|
||||
virtual char* BufLock(CGxBuf* buf);
|
||||
|
Loading…
Reference in New Issue
Block a user