Fix unneeded legacy OpenGL call in Cycles viewport drawing.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 18 Nov 2017 05:08:35 +0000 (06:08 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 23 Nov 2017 23:12:48 +0000 (00:12 +0100)
intern/cycles/device/device.cpp
intern/cycles/device/device_cuda.cpp

index 0364f809f8c032d95b651ef591e5f636c10cf8ab..d6f5c5af4284b7f5dadb0cd5843173a78657c74f 100644 (file)
@@ -260,8 +260,6 @@ void Device::draw_pixels(
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 
-       glEnable(GL_TEXTURE_2D);
-
        if(transparent) {
                glEnable(GL_BLEND);
                glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -345,7 +343,6 @@ void Device::draw_pixels(
        }
 
        glBindTexture(GL_TEXTURE_2D, 0);
-       glDisable(GL_TEXTURE_2D);
        glDeleteTextures(1, &texid);
 
        if(transparent) {
index c9e1fcad8f29a044404bf37b4c189f77b4b2ad4f..ce0df36a76f647bd99f156caed8a3088dda3d76d 100644 (file)
@@ -1782,8 +1782,6 @@ public:
                        }
                        glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
 
-                       glEnable(GL_TEXTURE_2D);
-
                        if(transparent) {
                                glEnable(GL_BLEND);
                                glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -1865,7 +1863,6 @@ public:
                        }
 
                        glBindTexture(GL_TEXTURE_2D, 0);
-                       glDisable(GL_TEXTURE_2D);
 
                        return;
                }