mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
MYST3: Implemented selection between hardware and software rendering.
Conflicts: engines/myst3/gfx_opengl.cpp
This commit is contained in:
parent
79ddb89ffe
commit
7ea5229ef8
@ -102,6 +102,9 @@ protected:
|
||||
Common::Rect getFontCharacterRect(uint8 character);
|
||||
};
|
||||
|
||||
Renderer *CreateGfxOpenGL(OSystem *system);
|
||||
Renderer *CreateGfxTinyGL(OSystem *system);
|
||||
|
||||
} // end of namespace Myst3
|
||||
|
||||
#endif /* GFX_H_ */
|
||||
|
@ -87,6 +87,10 @@ static const GLfloat faceTextureCoords[] = {
|
||||
1.0f, 0.0f,
|
||||
};
|
||||
|
||||
Renderer *CreateGfxOpenGL(OSystem *system) {
|
||||
return new OpenGLRenderer(system);
|
||||
}
|
||||
|
||||
OpenGLRenderer::OpenGLRenderer(OSystem *system) :
|
||||
BaseRenderer(system),
|
||||
_nonPowerOfTwoTexSupport(false) {
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
namespace Myst3 {
|
||||
|
||||
Renderer *Renderer::createRenderer(OSystem *system) {
|
||||
Renderer *CreateGfxTinyGL(OSystem *system) {
|
||||
return new TinyGLRenderer(system);
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,13 @@ Common::Error Myst3Engine::run() {
|
||||
return Common::kUserCanceled;
|
||||
}
|
||||
|
||||
_gfx = Renderer::createRenderer(_system);
|
||||
bool softRenderer = ConfMan.getBool("soft_renderer");
|
||||
|
||||
if (softRenderer) {
|
||||
_gfx = CreateGfxTinyGL(_system);
|
||||
} else {
|
||||
_gfx = CreateGfxOpenGL(_system);
|
||||
}
|
||||
_sound = new Sound(this);
|
||||
_ambient = new Ambient(this);
|
||||
_rnd = new Common::RandomSource("sprint");
|
||||
@ -161,7 +167,7 @@ Common::Error Myst3Engine::run() {
|
||||
_menu = new Menu(this);
|
||||
_archiveNode = new Archive();
|
||||
|
||||
Graphics::PixelBuffer screenBuffer = _system->setupScreen(w, h, false, false);
|
||||
Graphics::PixelBuffer screenBuffer = _system->setupScreen(w, h, false, softRenderer == false);
|
||||
_system->showMouse(false);
|
||||
|
||||
openArchives();
|
||||
|
Loading…
x
Reference in New Issue
Block a user