OpenTasks/Generic/Improve the default backend

From ScummVM :: Wiki
Jump to navigation Jump to search
Closed Task
Task Name Improve the default ScummVM backend by adding OpenGL support and providing a common base class
Technical Contact(s) John Willis, Joost Peters
Subsystem Generic
Status GSoC 2010, (mostly) completed

TODO: This task was partially implemented during GSoC 2010. We may want to remove it here, pending review by the mentors. However, it is not clear to me whether this is really completely done. E.g. the iPhone port uses OpenGL ES, but AFAIK no attempt has been made to integrate the work from this project with that. Whether such an integration is desirable or even possible needs to be clarified, too.

Background:

Since its inception, ScummVM has offered a default cross platform backend that makes use of the extensive and prolific SDL API. We have no intention to change this but we would like to extend the default backend to take advantage of things like OpenGL, and its little brother OpenGL ES, that is becoming commonplace on the latest generations of devices.

We would also like to refactor the common aspects of the SDL backend into a common base class to better support backends that derive from it. Architecturally, this could be very elegant and allow platforms to derive from the common SDL base (inc. the OpenGL and default existing one) and future platforms could also derive from the OpenGL base etc.

There are a number of required features that the extended backend must have.

The Task:

  • Allow for arbitrary rate scaling using OpenGL/OpenGL ES.
  • Be well written and maintainable!
    • This could become part of the default choice for ScummVM’s user base so really does have to be well architected.
  • Offer a fallback to the existing rendering code if OpenGL support is not available OR not desired by the user. This should be configurable at run time and maybe via a config setting?
  • Support removing the new OpenGL code at compile time by the use of structured defines so that NO OpenGL code need be built if not required.
    • We have a number of ports that derive from the SDL backend and really could not cope with the code bloat.

Also required:

  • This task will require testing under both OpenGL and OpenGL ES APIs.
    • There are sample OpenGL ES and OpenGL implementations for development available from several sources. (For OpenGL ES, the PowerVR SGX SDK should be of interest.)

Required Skills:

  • Reasonable C++ skills.
  • Refactoring skills.
  • Knowledge of the OpenGL and SDL APIs.
  • Knowledge of the default SDL ScummVM platform backend is desirable.