Moved another AMD-specific driver bug workaround to the OpenGL Bugs struct.

This commit is contained in:
Alex Szpakowski
2016-01-13 21:43:00 -04:00
parent 314a82b126
commit abd3c64bc5
3 changed files with 14 additions and 5 deletions
+1 -4
View File
@@ -202,11 +202,8 @@ void Image::generateMipmaps()
if (flags.mipmaps && !isCompressed() &&
(GLAD_ES_VERSION_2_0 || GLAD_VERSION_3_0 || GLAD_ARB_framebuffer_object))
{
// Driver bug: http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation
#if defined(LOVE_WINDOWS) || defined(LOVE_LINUX)
if (gl.getVendor() == OpenGL::VENDOR_AMD)
if (gl.bugs.generateMipmapsRequiresTexture2DEnable)
glEnable(GL_TEXTURE_2D);
#endif
glGenerateMipmap(GL_TEXTURE_2D);
}