Shaders in Android still not Working

#1

Hello Everyone,

I’m not sure if this issue has been solved already. So my apologies for still struggling due to my currently limited set of skills. For the last 3 days I tried my best to make shaders work in Android but ended up in frustration instead. Right now my Android app is CPU-bound only which sucks because of the low frame rates.

If only ofshader could work in Android on OF 0.10.1, then that would be really awesome and super appreciated. Has anyone successfully made GLES 2.0 or higher, work in Android? If ever, how did you do it? Mind sharing some tips and lengthy instructions maybe?

Thank you so much to anyone willing to help.

#2

does the androidShaderExample in examples not work for you?

#3

All I have noticed is needing to use different ofSetColor() calls to get things to appear on different Android devices. And some fonts and images seeming not to load, probably based on image format, but I haven’t analyzed exactly what the issues were yet. Could you be more specific about the problem you’re referring to here with shaders?

#4

I’ve tried it already, even using the latest nightly build from https://openframeworks.cc/ci_server/versions/nightly/of_v20191015_android_nightly.tar.gz. Just doesn’t seem to work for some reason.

Even tried using ofSetColor() / ofSetHexColor() to see the wobbling shader effect from androidShaderExample, but still nothing. It just leaves a black screen during touchDown() event instead of the expected output.

Though it can be done, as much as possible I’d like to avoid directly modifying ofShader.cpp/.h myself just to make it work as that might cause further complications on my future projects getting unnecessary side-effects from my hacked-up patch.

#5

what kind of device are you testing on?

#6

I’m currently using a Samsung Galaxy J7, Android version 5.1.1 and Samsung Galaxy Tab A 2018, Android version 9. I Can’t make even the simple androidShaderExample work on any of the devices.