Frontend: Fix broken display texture for OpenGL

This commit is contained in:
Connor McLaughlin 2019-11-04 01:01:31 +10:00
parent 4a6f283484
commit ac45f3892c
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@ Log_SetChannel(HostInterface);
HostInterface::HostInterface()
{
m_settings.gpu_renderer = Settings::GPURenderer::HardwareD3D11;
m_settings.gpu_renderer = Settings::GPURenderer::HardwareOpenGL;
m_settings.memory_card_a_filename = "memory_card_a.mcd";
}

View File

@ -33,6 +33,8 @@ public:
glBindTexture(GL_TEXTURE_2D, id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, initial_data);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, id);
return std::make_unique<OpenGLHostDisplayTexture>(id, width, height);