mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
BACKENDS: Remove accel3d flag completely.
This commit is contained in:
parent
42d55b2436
commit
723ffa111b
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user