fix(gx): restore old behavior to GLSDL

This commit is contained in:
superp00t 2023-11-30 16:11:40 -05:00
parent 29edb4e032
commit 47b9878e3e
2 changed files with 20 additions and 24 deletions

View File

@ -186,7 +186,7 @@ int32_t CGxDeviceGLSDL::DeviceCreate(int32_t (*windowProc)(void* window, uint32_
}
this->m_GLSDLWindow.Create("World of Warcraft", rect, GLTF_D24, 1);
this->m_GLSDLDevice.Init(&this->m_GLSDLWindow, "WoW", 0);
this->m_GLSDLDevice.Init(&this->m_GLSDLWindow, "WoW", 0x4);
// this->m_GLSDLDevice.Init(&this->m_GLSDLWindow, "WoW", 4);
GLSDLDevice::SetOption(GLSDLDevice::eShaderConstantBindings, false);

View File

@ -2739,32 +2739,28 @@ void GLSDLDevice::Sub38460(bool a2) {
}
void GLSDLDevice::Swap() {
// if (this->m_Context.m_Window) {
// if (this->m_FlippedSystemBuffer) {
// GLRect rect = {
// 0,
// 0,
// static_cast<int32_t>(this->m_BackBufferColor->m_Width),
// static_cast<int32_t>(this->m_BackBufferColor->m_Height)
// };
if (this->m_Window) {
if (this->m_FlippedSystemBuffer) {
GLRect rect = {
0,
0,
static_cast<int32_t>(this->m_BackBufferColor->m_Width),
static_cast<int32_t>(this->m_BackBufferColor->m_Height)
};
// GLMipmap* image = this->m_BackBufferColor->GetMipmap(0, GL_TEXTURE_CUBE_MAP_POSITIVE_X);
// this->CopyTex(0, 0, image, &rect);
// }
GLMipmap* image = this->m_BackBufferColor->GetMipmap(0, GL_TEXTURE_CUBE_MAP_POSITIVE_X);
this->CopyTex(0, 0, image, &rect);
}
// this->DrawRect();
this->DrawRect();
// this->m_FrameNumber++;
// this->m_DrawCount = 0;
// } else {
// // glFlushRender();
// this->m_DrawCount = 0;
// }
this->DrawRect();
this->m_FrameNumber++;
this->m_DrawCount = 0;
}
this->m_FrameNumber++;
this->m_DrawCount = 0;
} else {
// glFlushRender();
this->m_DrawCount = 0;
}
}s
void GLSDLDevice::UpdateFFPTexturing() {
// TODO