MYST3: Added openGL shader renderer selection.

This commit is contained in:
Stefano Musumeci 2014-06-22 21:46:50 +02:00
parent a77ebef942
commit cfb3c8eadc
3 changed files with 9 additions and 0 deletions

View File

@ -103,6 +103,7 @@ protected:
};
Renderer *CreateGfxOpenGL(OSystem *system);
Renderer *CreateGfxOpenGLShader(OSystem *system);
Renderer *CreateGfxTinyGL(OSystem *system);
} // end of namespace Myst3

View File

@ -63,6 +63,10 @@
namespace Myst3 {
Renderer *CreateGfxOpenGLShader(OSystem *system) {
return new ShaderRenderer(system);
}
Renderer *Renderer::createRenderer(OSystem *system) {
return new ShaderRenderer(system);
}

View File

@ -154,7 +154,11 @@ Common::Error Myst3Engine::run() {
if (softRenderer) {
_gfx = CreateGfxTinyGL(_system);
} else {
#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
_gfx = CreateGfxOpenGLShader(_system);
#else
_gfx = CreateGfxOpenGL(_system);
#endif
}
_sound = new Sound(this);
_ambient = new Ambient(this);