What am I missing here? I can’t get hardware rendering to work in Android. That is, SDL_CreateWindow() with SDL_RENDERER_ACCELERATED always fails, saying hardware rendering isn’t supported. I can revert to software rendering instead, so at least it’s working, but then the game runs extremely slowly (only 1 or 2 fps instead of 60).
Everything’s fine on the Linux version under Ubuntu. Hardware acceleration performs at 60 fps with almost 0 CPU load. (And if I try software instead, it’s also too slow to play.)
I’ve tested on these devices: an old HTC phone (Android 4.0.4) and two different 7" tablets, an LG G Pad 7 and generic unknown brand (both Android 4.4.2). I’m pretty sure the tablets support OpenGL ES 2.0 at least.
I’m targeting Android-18 right now but also tried 15 and 21 at times.
This seems kind of strange, but when I use SDL_GetRenderDriverInfo() on either Linux or Android, they both show me 3 different OpenGL drivers. Yet SDL_RENDERER_ACCELERATED is always refused on Android.
I’m trying to find some way to get my game that I’ve put so many hundreds (or thousands?) of hours into.
I just don’t know why SDL works fine for other games like Hatched! and not mine, even on my own devices. There must be something I’m doing wrong.
(At least if I have this game, I’ll have something to show to try to get a job. Most of my last 2 jobs were Flash and iPhone apps under a strict NDA so whenever I tell that to employers, they probably just assume I’m lying.)
*rewritten in Java I meant.