[Scummvm-git-logs] scummvm master -> 9e72366b5fdab139eafdb385b2b452d878d112cd

aquadran noreply at scummvm.org
Sat Dec 4 23:09:00 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9e72366b5f ENGINES: Allow to build without TINYGL enabled


Commit: 9e72366b5fdab139eafdb385b2b452d878d112cd
    https://github.com/scummvm/scummvm/commit/9e72366b5fdab139eafdb385b2b452d878d112cd
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-12-05T00:08:53+01:00

Commit Message:
ENGINES: Allow to build without TINYGL enabled

Changed paths:
    engines/grim/configure.engine
    engines/grim/gfx_base.cpp
    engines/grim/grim.cpp
    engines/grim/module.mk
    engines/myst3/configure.engine
    engines/myst3/gfx.cpp
    engines/myst3/module.mk
    engines/playground3d/configure.engine
    engines/playground3d/gfx.cpp
    engines/playground3d/module.mk
    engines/stark/gfx/driver.cpp
    engines/stark/module.mk
    engines/wintermute/base/base_game.cpp


diff --git a/engines/grim/configure.engine b/engines/grim/configure.engine
index 4961d6f472..b4498ad000 100644
--- a/engines/grim/configure.engine
+++ b/engines/grim/configure.engine
@@ -1,4 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine grim "Grim" yes "monkey4" "Grim Fandango" "tinygl 16bit highres zlib"
+add_engine grim "Grim" yes "monkey4" "Grim Fandango" "16bit highres zlib"
 add_engine monkey4 "Escape from Monkey Island" yes "" "" "bink mpeg2"
diff --git a/engines/grim/gfx_base.cpp b/engines/grim/gfx_base.cpp
index 0f7bfe0dca..1a2d57ffb4 100644
--- a/engines/grim/gfx_base.cpp
+++ b/engines/grim/gfx_base.cpp
@@ -110,13 +110,6 @@ void GfxBase::drawMesh(const Mesh *mesh) {
 		mesh->_faces[i].draw(mesh);
 }
 
-#ifndef USE_OPENGL_GAME
-// Allow CreateGfxOpenGL to be called even if OpenGL isn't included
-GfxBase *CreateGfxOpenGL() {
-	return CreateGfxTinyGL();
-}
-#endif // USE_OPENGL_GAME
-
 Math::Matrix4 GfxBase::makeLookMatrix(const Math::Vector3d& pos, const Math::Vector3d& interest, const Math::Vector3d& up) {
 	Math::Vector3d f = (interest - pos).getNormalized();
 	Math::Vector3d u = up.getNormalized();
diff --git a/engines/grim/grim.cpp b/engines/grim/grim.cpp
index 276ca750d6..7b1edc0ea3 100644
--- a/engines/grim/grim.cpp
+++ b/engines/grim/grim.cpp
@@ -305,10 +305,11 @@ GfxBase *GrimEngine::createRenderer(int screenW, int screenH) {
 		renderer = CreateGfxOpenGL();
 	}
 #endif
+#if defined(USE_TINYGL)
 	if (matchingRendererType == Graphics::kRendererTypeTinyGL) {
 		renderer = CreateGfxTinyGL();
 	}
-
+#endif
 	if (!renderer) {
 		error("Unable to create a '%s' renderer", rendererConfig.c_str());
 	}
diff --git a/engines/grim/module.mk b/engines/grim/module.mk
index 7449df69fe..67607db9fb 100644
--- a/engines/grim/module.mk
+++ b/engines/grim/module.mk
@@ -100,7 +100,6 @@ MODULE_OBJS := \
 	debug.o \
 	font.o \
 	gfx_base.o \
-	gfx_tinygl.o \
 	gfx_opengl_shaders.o \
 	gfx_opengl.o \
 	grim.o \
@@ -143,6 +142,11 @@ MODULE_OBJS += \
 	movie/codecs/blocky8ARM.o
 endif
 
+ifdef USE_TINYGL
+MODULE_OBJS += \
+	gfx_tinygl.o
+endif
+
 # This module can be built as a plugin
 ifeq ($(ENABLE_GRIM), DYNAMIC_PLUGIN)
 PLUGIN := 1
diff --git a/engines/myst3/configure.engine b/engines/myst3/configure.engine
index f7435edb5e..a99a5dee48 100644
--- a/engines/myst3/configure.engine
+++ b/engines/myst3/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine myst3 "Myst 3" yes "" "" "tinygl 16bit highres jpeg bink"
+add_engine myst3 "Myst 3" yes "" "" "16bit highres jpeg bink"
diff --git a/engines/myst3/gfx.cpp b/engines/myst3/gfx.cpp
index 8e27622be7..be1ec771d7 100644
--- a/engines/myst3/gfx.cpp
+++ b/engines/myst3/gfx.cpp
@@ -235,10 +235,11 @@ Renderer *createRenderer(OSystem *system) {
 		return CreateGfxOpenGL(system);
 	}
 #endif
+#if defined(USE_TINYGL)
 	if (matchingRendererType == Graphics::kRendererTypeTinyGL) {
 		return CreateGfxTinyGL(system);
 	}
-
+#endif
 	error("Unable to create a '%s' renderer", rendererConfig.c_str());
 }
 
diff --git a/engines/myst3/module.mk b/engines/myst3/module.mk
index 97bd47e34d..9b6825f6f2 100644
--- a/engines/myst3/module.mk
+++ b/engines/myst3/module.mk
@@ -9,10 +9,8 @@ MODULE_OBJS := \
 	effects.o \
 	gfx.o \
 	gfx_opengl.o \
-	gfx_tinygl.o \
 	gfx_opengl_shaders.o \
 	gfx_opengl_texture.o \
-	gfx_tinygl_texture.o \
 	hotspot.o \
 	inventory.o \
 	menu.o \
@@ -30,6 +28,12 @@ MODULE_OBJS := \
 	subtitles.o \
 	transition.o
 
+ifdef USE_TINYGL
+MODULE_OBJS += \
+	gfx_tinygl.o \
+	gfx_tinygl_texture.o
+endif
+
 # This module can be built as a plugin
 ifeq ($(ENABLE_MYST3), DYNAMIC_PLUGIN)
 PLUGIN := 1
diff --git a/engines/playground3d/configure.engine b/engines/playground3d/configure.engine
index bb84dffb56..66fd3f19cb 100644
--- a/engines/playground3d/configure.engine
+++ b/engines/playground3d/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine playground3d "Playground 3d: the testing and plaground environment for 3d renderers" no "" "" "tinygl 16bit highres"
+add_engine playground3d "Playground 3d: the testing and plaground environment for 3d renderers" no "" "" "16bit highres"
diff --git a/engines/playground3d/gfx.cpp b/engines/playground3d/gfx.cpp
index 9480d91d95..a584fd17f3 100644
--- a/engines/playground3d/gfx.cpp
+++ b/engines/playground3d/gfx.cpp
@@ -154,9 +154,11 @@ Renderer *createRenderer(OSystem *system) {
 		return CreateGfxOpenGL(system);
 	}
 #endif
+#if defined(USE_TINYGL)
 	if (matchingRendererType == Graphics::kRendererTypeTinyGL) {
 		return CreateGfxTinyGL(system);
 	}
+#endif
 
 	error("Unable to create a '%s' renderer", rendererConfig.c_str());
 }
diff --git a/engines/playground3d/module.mk b/engines/playground3d/module.mk
index 020c0255ca..fa2566dd8e 100644
--- a/engines/playground3d/module.mk
+++ b/engines/playground3d/module.mk
@@ -5,9 +5,13 @@ MODULE_OBJS := \
 	gfx.o \
 	gfx_opengl.o \
 	gfx_opengl_shaders.o \
-	gfx_tinygl.o \
 	playground3d.o
 
+ifdef USE_TINYGL
+MODULE_OBJS += \
+	gfx_tinygl.o
+endif
+
 MODULE_DIRS += \
 	engines/playground3d
 
diff --git a/engines/stark/gfx/driver.cpp b/engines/stark/gfx/driver.cpp
index d7ae6cb72b..6ed48d54fc 100644
--- a/engines/stark/gfx/driver.cpp
+++ b/engines/stark/gfx/driver.cpp
@@ -78,6 +78,7 @@ Driver *Driver::create() {
 		driver = new OpenGLDriver();
 	}
 #endif
+#if defined(USE_TINYGL)
 	if (matchingRendererType == Graphics::kRendererTypeTinyGL) {
 		if (StarkSettings->isAssetsModEnabled()) {
 			GUI::displayErrorDialog(Common::U32String::format(_("Software renderer does not support modded assets")));
@@ -85,7 +86,7 @@ Driver *Driver::create() {
 		}
 		driver = new TinyGLDriver();
 	}
-
+#endif
 	if (driver)
 		return driver;
 	warning("No renderers have been found for this game");
diff --git a/engines/stark/module.mk b/engines/stark/module.mk
index aa32e30cc5..478c73f9ff 100644
--- a/engines/stark/module.mk
+++ b/engines/stark/module.mk
@@ -16,13 +16,6 @@ MODULE_OBJS := \
 	gfx/opengltexture.o \
 	gfx/renderentry.o \
 	gfx/surfacerenderer.o \
-	gfx/tinygl.o \
-	gfx/tinyglactor.o \
-	gfx/tinyglbitmap.o \
-	gfx/tinyglfade.o \
-	gfx/tinyglprop.o \
-	gfx/tinyglsurface.o \
-	gfx/tinygltexture.o \
 	gfx/texture.o \
 	formats/biff.o \
 	formats/biffmesh.o \
@@ -131,6 +124,17 @@ MODULE_OBJS := \
 	visual/smacker.o \
 	visual/text.o
 
+ifdef USE_TINYGL
+MODULE_OBJS += \
+	gfx/tinygl.o \
+	gfx/tinyglactor.o \
+	gfx/tinyglbitmap.o \
+	gfx/tinyglfade.o \
+	gfx/tinyglprop.o \
+	gfx/tinyglsurface.o \
+	gfx/tinygltexture.o
+endif
+
 # This module can be built as a plugin
 ifeq ($(ENABLE_STARK), DYNAMIC_PLUGIN)
 PLUGIN := 1
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 0456aa5b1c..c8a84f6caa 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -541,10 +541,12 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
 		_renderer3D = makeOpenGL3DRenderer(this);
 	}
 #endif // defined(USE_OPENGL)
+#if defined(USE_TINYGL)
 	if (_playing3DGame && matchingRendererType == Graphics::kRendererTypeTinyGL) {
 		_renderer3D = nullptr;// TODO: makeTinyGL3DRenderer(this);
 		error("3D software renderered is not supported yet");
 	}
+#endif
 	_renderer = _renderer3D;
 #if !defined(USE_OPENGL_GAME) && !defined(USE_OPENGL_SHADERS)
 	if (!_playing3DGame && !_renderer3D)




More information about the Scummvm-git-logs mailing list