When I set myself the goal to port my work on Android I knew nothing about OpenGL ES 2.0, which is currently used on most of mobile devices. Somebody told me that porting should be easy. Liar. My current work is based on sources of Orkin’s glN64 plugin, written 10 years ago, before OpenGL 2.0 became standard. Now OpenGL standard has version 4+, and it is changed drastically. Nevertheless, it is backward compatible with old functions and allows programmers to mix new features with old good ones. But only on desktop. Mobile devices don’t want to support old shit, so everything “superfluous” was thrown away. With OGL ES shaders are must, data arrays are must, “fixed” functionality is reduced to minimum. When I estimated amount of work needed for port, I felt sad. Most of inherited OpenGL code had to be completely rewritten.
I downloaded sources of Mupen64Plus Android Edition (AE), which is unofficial port of Mupen64Plus to Android. I hoped to find some clues in it how to make the port. I was lucky: Mupen64Plus AE already has working Android port of glN64! I took it as reference and started to rewrite my version. Some part of code was absolutely useless for me, but I must confess that large part of code was adopted with minimal changes. Nevertheless, when I finished the rewriting, I spend weeks before I got first picture. On desktop version! Then I spent few months fighting with regressions. On desktop version! Of course, I did not work on it days and nights – I don’t have so much time. But a lot of my spare time was spent just to get the result I had with my old OpenGL code. When my plugin started to work with Mupen64Plus for Linux I finally approached to Android itself. Again, I spent many time just to make the code compile on Android. And I spent much much more time before I got something rendered on screen of my device. May be next time I’ll describe the technical problems I solved. I’m just in the beginning of that long road. Today I’ll just show you a few screenshots:
GUI. Video plugin selection.
My plugin settings. Not everything is working yet.
The Legend of Zelda - Majora's Mask.
Mario Golf. Frame buffer emulation.
Mario Tennis. Far from perfect yet due to ES restrictions on Frame Buffer Objects.