[Bf-blender-cvs] [d992240bfaf] blender2.8: Fix unneeded legacy OpenGL call in Cycles viewport drawing.

Brecht Van Lommel noreply at git.blender.org
Fri Nov 24 00:55:49 CET 2017


Commit: d992240bfafd749a6535cc3abf0815567f8a3af7
Author: Brecht Van Lommel
Date:   Sat Nov 18 06:08:35 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBd992240bfafd749a6535cc3abf0815567f8a3af7

Fix unneeded legacy OpenGL call in Cycles viewport drawing.

===================================================================

M	intern/cycles/device/device.cpp
M	intern/cycles/device/device_cuda.cpp

===================================================================

diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 0364f809f8c..d6f5c5af428 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -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) {
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index c9e1fcad8f2..ce0df36a76f 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -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;
 		}



More information about the Bf-blender-cvs mailing list