summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
diff options
context:
space:
mode:
authorVincent Duvert <vincent@duvert.net>2017-03-17 23:53:56 +0100
committerVincent Duvert <vincent@duvert.net>2017-03-17 23:53:56 +0100
commitbbb59453757e706c3a68ae43c50b23d7072fbc4f (patch)
tree886718f911ca78ce8698f42353f7787e8f1462c2 /Source/Core/VideoBackends/OGL/FramebufferManager.cpp
parentb7f605e88e885d645bfe2d8c9bfdb571f82059f3 (diff)
OGL: Fix texture_type checks in CreateTexture
The FrameBufferManager::CreateTexture (from the OpenGL backend) method introduced by commit 69cedf41 incorrectly compares the texture variable (which contains a name provided by glGenTextures) against GL_TEXTURE_2D_MULTISAMPLE_ARRAY and GL_TEXTURE_2D_MULTISAMPLE. It should instead use the texture_type variable for this (as done in the first branch of the if).
Diffstat (limited to 'Source/Core/VideoBackends/OGL/FramebufferManager.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/FramebufferManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
index 17244db24e..5fc1651285 100644
--- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
+++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
@@ -63,7 +63,7 @@ GLuint FramebufferManager::CreateTexture(GLenum texture_type, GLenum internal_fo
glTexImage3D(texture_type, 0, internal_format, m_targetWidth, m_targetHeight, m_EFBLayers, 0,
pixel_format, data_type, nullptr);
}
- else if (texture == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
+ else if (texture_type == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
{
if (g_ogl_config.bSupports3DTextureStorage)
glTexStorage3DMultisample(texture_type, m_msaaSamples, internal_format, m_targetWidth,
@@ -72,7 +72,7 @@ GLuint FramebufferManager::CreateTexture(GLenum texture_type, GLenum internal_fo
glTexImage3DMultisample(texture_type, m_msaaSamples, internal_format, m_targetWidth,
m_targetHeight, m_EFBLayers, false);
}
- else if (texture == GL_TEXTURE_2D_MULTISAMPLE)
+ else if (texture_type == GL_TEXTURE_2D_MULTISAMPLE)
{
if (g_ogl_config.bSupports2DTextureStorage)
glTexStorage2DMultisample(texture_type, m_msaaSamples, internal_format, m_targetWidth,