[Scummvm-git-logs] scummvm master -> 723ffa111b4275505c1bf2252cde122ca03be1ce
aquadran
aquadran at gmail.com
Tue Oct 13 21:00:27 UTC 2020
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:
723ffa111b BACKENDS: Remove accel3d flag completely.
Commit: 723ffa111b4275505c1bf2252cde122ca03be1ce
https://github.com/scummvm/scummvm/commit/723ffa111b4275505c1bf2252cde122ca03be1ce
Author: PaweÅ KoÅodziejski (aquadran at users.sourceforge.net)
Date: 2020-10-13T23:00:19+02:00
Commit Message:
BACKENDS: Remove accel3d flag completely.
Changed paths:
backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
backends/platform/sdl/sdl.cpp
common/system.h
engines/engine.cpp
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index 06b2752c1b..60eb64ee8e 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -148,7 +148,6 @@ int OpenGLSdlGraphics3dManager::getDefaultGraphicsMode() const {
bool OpenGLSdlGraphics3dManager::setGraphicsMode(int mode, uint flags) {
assert(_transactionMode != kTransactionNone);
assert(flags & OSystem::kGfxModeRender3d);
- assert(flags & OSystem::kGfxModeAcceleration3d);
return true;
}
diff --git a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
index 220b46bd64..ef79f09d95 100644
--- a/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
+++ b/backends/graphics3d/surfacesdl/surfacesdl-graphics3d.cpp
@@ -140,7 +140,6 @@ int SurfaceSdlGraphics3dManager::getDefaultGraphicsMode() const {
bool SurfaceSdlGraphics3dManager::setGraphicsMode(int mode, uint flags) {
assert(_transactionMode != kTransactionNone);
assert(flags & OSystem::kGfxModeRender3d);
- assert(!(flags & OSystem::kGfxModeAcceleration3d));
return true;
}
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 7a43ee4c8b..e4c88c01be 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -723,7 +723,6 @@ int OSystem_SDL::getDefaultGraphicsMode() const {
bool OSystem_SDL::setGraphicsMode(int mode, uint flags) {
bool render3d = flags & OSystem::kGfxModeRender3d;
- bool accel3d = flags & OSystem::kGfxModeAcceleration3d;
// In 3d render mode gfx mode param is ignored.
if (_graphicsModes.empty() && !render3d) {
@@ -787,7 +786,7 @@ bool OSystem_SDL::setGraphicsMode(int mode, uint flags) {
}
#ifdef USE_OPENGL_GAME
- if (accel3d && !dynamic_cast<OpenGLSdlGraphics3dManager *>(sdlGraphics3dManager)) {
+ if (!dynamic_cast<OpenGLSdlGraphics3dManager *>(sdlGraphics3dManager)) {
if (sdlGraphics3dManager) {
sdlGraphics3dManager->deactivateManager();
delete sdlGraphics3dManager;
@@ -797,20 +796,8 @@ bool OSystem_SDL::setGraphicsMode(int mode, uint flags) {
if (sdlGraphicsManager)
sdlGraphics3dManager->setDefaultFeatureState();
switchedManager = true;
- } else
-#endif
- if (!accel3d && !dynamic_cast<SurfaceSdlGraphics3dManager *>(sdlGraphics3dManager)) {
- if (sdlGraphics3dManager) {
- sdlGraphics3dManager->deactivateManager();
- delete sdlGraphics3dManager;
- }
- _graphicsManager = sdlGraphics3dManager = new SurfaceSdlGraphics3dManager(_eventSource, _window);
- // Setup feature defaults for 3D gfx while switching from 2D
- if (sdlGraphicsManager)
- sdlGraphics3dManager->setDefaultFeatureState();
- switchedManager = true;
}
-
+#endif
if (sdlGraphicsManager) {
sdlGraphicsManager = nullptr;
}
diff --git a/common/system.h b/common/system.h
index fd52e9dc23..3e707be436 100644
--- a/common/system.h
+++ b/common/system.h
@@ -602,9 +602,8 @@ public:
virtual int getDefaultGraphicsMode() const { return 0; }
enum GfxModeFlags {
- kGfxModeNoFlags = 0, /**< No Flags */
- kGfxModeRender3d = (1 << 0), /**< Indicate 3d drawing mode */
- kGfxModeAcceleration3d = (1 << 1) /**< Indicate 3d hardware support */
+ kGfxModeNoFlags = 0, /**< No Flags */
+ kGfxModeRender3d = (1 << 0), /**< Indicate 3d h/w accelerated in game gfx */
};
/**
@@ -612,11 +611,7 @@ public:
* failed, this method returns false.
*
* The flag 'kGfxModeRender3d' is optional. It allow to switch to 3D only rendering mode.
- * The argument 'mode' will be ignored. Game engine is allowed to use OpenGL(ES) or TinyGL API direclty.
- * Which one depends on 'kGfxModeAcceleration3d' flag.
- *
- * The flag 'kGfxModeAcceleration3d' is optional and work only with kGfxModeRender3d.
- * OpenGL(ES) is only allowed to use by game engine to draw graphics.
+ * Game engine is allowed to use OpenGL(ES) direclty.
*
* @param mode the ID of the new graphics mode
* @param flags the flags for new graphics mode
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 239b07ea7f..1fa94edba3 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -397,7 +397,7 @@ void initGraphics(int width, int height) {
void initGraphics3d(int width, int height, bool fullscreen) {
g_system->beginGFXTransaction();
- g_system->setGraphicsMode(0, OSystem::kGfxModeRender3d | OSystem::kGfxModeAcceleration3d);
+ g_system->setGraphicsMode(0, OSystem::kGfxModeRender3d);
g_system->initSize(width, height);
g_system->setFeatureState(OSystem::kFeatureFullscreenMode, fullscreen);
g_system->endGFXTransaction();
More information about the Scummvm-git-logs
mailing list