mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 19:16:21 +00:00
e6232547d5
The ios7 backend implements the graphic handling in the backend code. iOS supports OpenGL through the OpenGL Framework since iOS 2.0. It's marked as deprecated but is still shipped with the SDKs for iPhoneOS and tvOS and will hopefully be so for some time. The ios7 backend can therefore utilize the OpenGLGraphicsManager to handle all graphics. Implement an iOSGraphicsManager class that can be used in the ios7 backend. The iOSGraphicsManager will require some callback functions in the ios7 backend. createOpenGLContext() will be called to ask the backend to create an OpenGL context in which the graphic manager can draw. The function returns the ID of the renderbuffer which shall be used when creating the framebuffer object this differ iOS from other platforms). A custom RenderBufferTarget class is added to address this. destroyOpenGLContext() will be called to make sure that the old GLES context is not reused. notifyContextDestroy() does call the function OpenGLContext.reset() but that will not destroy the context. refreshScreen() will be called to ask the backend to present the drawn graphics on the screen. getSystemHiDPIScreenFactor() is called to get the screen scaling factor. getScreenWidth() and getScreenHeight() are called to get the width and height of the surface to draw on. This commit adds the class but the ios7 backend doesn't make use of it quite yet. To use it require the ios7 to be a child class of the ModularGraphicsBackend. That change requires a lot of changes which will be targeted in separate commits. Update docportal and github ci worker to only disable the feature opengl_classic_game since opengl and opengl_shaders are required to compile the OpenGLGraphicsManager.