[Bf-blender-cvs] [33ef280] master: BGE: remove calls to GLSL support query (it's always supported)

Mike Erwin noreply at git.blender.org
Mon Oct 10 07:30:02 CEST 2016


Commit: 33ef28068a87239f5d4e7170b2fcf7eb704da716
Author: Mike Erwin
Date:   Mon Oct 10 01:08:49 2016 -0400
Branches: master
https://developer.blender.org/rB33ef28068a87239f5d4e7170b2fcf7eb704da716

BGE: remove calls to GLSL support query (it's always supported)

Reworked logic in the few places that still called this. Deleted the "GLSL not supported" fallbacks.

Also removed some nearby checks for ARB_multitexture and OpenGL 1.1. Blender 2.77 removed checks like this, but game engine still has some.

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

M	source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
M	source/gameengine/GamePlayer/ghost/GPG_Application.cpp
M	source/gameengine/Ketsji/BL_Texture.cpp

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

diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 91683f4..d7fe8d8 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -465,19 +465,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
 			if (always_use_expand_framing)
 				sceneconverter->SetAlwaysUseExpandFraming(true);
 
-			bool usemat = false, useglslmat = false;
+			sceneconverter->SetMaterials(true);
 
-			if (GLEW_ARB_multitexture && GLEW_VERSION_1_1)
-				usemat = true;
-
-			if (GPU_glsl_support())
-				useglslmat = true;
-			else if (gs.matmode == GAME_MAT_GLSL)
-				usemat = false;
-
-			if (usemat)
-				sceneconverter->SetMaterials(true);
-			if (useglslmat && (gs.matmode == GAME_MAT_GLSL))
+			if (gs.matmode == GAME_MAT_GLSL)
 				sceneconverter->SetGLSLMaterials(true);
 			if (scene->gm.flag & GAME_NO_MATERIAL_CACHING)
 				sceneconverter->SetCacheMaterials(false);
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index e697306..408006a 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -590,13 +590,8 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
 		bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0);
 		bool restrictAnimFPS = (gm->flag & GAME_RESTRICT_ANIM_UPDATES) != 0;
 
-		if (GLEW_ARB_multitexture && GLEW_VERSION_1_1)
-			m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", 1) != 0);
-
-		if (GPU_glsl_support())
-			m_blenderglslmat = (SYS_GetCommandLineInt(syshandle, "blender_glsl_material", 1) != 0);
-		else if (m_globalSettings->matmode == GAME_MAT_GLSL)
-			m_blendermat = false;
+		m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", 1) != 0);
+		m_blenderglslmat = (SYS_GetCommandLineInt(syshandle, "blender_glsl_material", 1) != 0);
 
 		// create the canvas, rasterizer and rendertools
 		m_canvas = new GPG_Canvas(window);
diff --git a/source/gameengine/Ketsji/BL_Texture.cpp b/source/gameengine/Ketsji/BL_Texture.cpp
index 730e49c..cc7fea5 100644
--- a/source/gameengine/Ketsji/BL_Texture.cpp
+++ b/source/gameengine/Ketsji/BL_Texture.cpp
@@ -420,14 +420,7 @@ int BL_Texture::GetMaxUnits()
 {
 	if (g_max_units < 0) {
 		GLint unit = 0;
-
-		if (GPU_glsl_support()) {
-			glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &unit);
-		}
-		else if (GLEW_ARB_multitexture) {
-			glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &unit);
-		}
-
+		glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &unit);
 		g_max_units = (MAXTEX >= unit) ? unit : MAXTEX;
 	}




More information about the Bf-blender-cvs mailing list