|
From: Maarten t. H. <ma...@tr...> - 2016-11-07 06:06:14
|
Hi all, Currently openMSX supports both software scaling using SDL 1.2 and hardware scaling using OpenGL 2.0 + extensions. The software scaling is something we'd like to drop: - the code is large, complex and slow to compile - it doesn't support zoom factors over 4x - this is a task that GPUs are great at, so why do it on CPU? Maybe it would be useful to keep the 1x scaling (line stretching) for the GCW Zero and other devices with a 320x240 screen and drop only the actual upscaling (2x/3x/4x). However, we also support platforms that don't have full (desktop) OpenGL support, for example Android. These platforms typically support OpenGL ES. Feature-wise OpenGL ES can do everything we need, but there are some practical issues we have to solve. One thing is acquiring an OpenGL ES context. I think SDL2 can do this for us. Another thing is that currently we use GLEW to manage GL extensions. But the main GLEW release doesn't support GL ES. Alternatives would be: - libepoxy (active) https://github.com/anholt/libepoxy - GLEW 1.7 adapted for GL ES (seems inactive, releases from 2011) https://launchpad.net/linaro-graphics-misc/ - add our own extension manager for those extensions we use - switch to a later GL version so we don't need extensions The last option sounds the most attractive to me, since it would result in simpler code and a simpler build. However, we have to check that the GL version we would need doesn't disqualify too many users. I grepped the openMSX source for "EXT" and "ARB" and it seems we only use two extensions: - GL_EXT_framebuffer_object - ARB_pixel_buffer_object The functionality offered by both of these extensions is part of GL ES 2.0, which is also the lowest version we could consider supporting (GL ES 1.x does not match modern hardware well at all). On the desktop, OpenGL 3.0 added support for framebuffer objects and OpenGL 2.1 added support for pixel buffer objects. So if we'd require OpenGL 3.0 as a minimum version, we wouldn't need GLEW anymore. Would it be a problem for anyone if we raise the minimum desktop OpenGL version requirement from 2.0 to 3.0? If not, I propose to do so and remove GLEW as a dependency. Bye, Maarten |