processing / processing-android-archive

96 stars 50 forks source link

“Smooth is not supported by this hardware (or driver)” with Nexus 4, Android 4.2.2 #3

Open benfry opened 11 years ago

benfry commented 11 years ago

Original post: https://github.com/processing/processing/issues/1733

emnullfuenf commented 11 years ago

Crashes on Nexus 4 in P3D mode. The problem does not occur on Nexus 7.

DanielFidalgo commented 11 years ago

same here, Smooth is not supported by this hardware (or driver) on a Galaxy note 2 Android 4.1.1 from a win 8 64x

somaniac commented 11 years ago

same error "Smooth is not supported by this hardware (or driver)" on Orange San Francisco (ZTE Blade) with Android 2.3.7

dmierkin commented 11 years ago

same on samsung galaxy s4 Android 4.2.2

andyli commented 11 years ago

Same here on Sony Xperia S running Android 4.0.4.

gersanchez commented 11 years ago

:( the same thing with me!! pantech P9070 running in Android 4.1.2

gtrianta commented 11 years ago

Same here (Samsung Galaxy Core with Android 4.1.2).

Doppelherz commented 10 years ago

Same here ( Nexus 7 2013 with Android 4.4 )

RockZou commented 10 years ago

Same problem for Nexus 5 with Android 4.4.2

Dart00 commented 10 years ago

Same problem Samsung Galaxy Mega :(

mark-orion commented 10 years ago

Same problem Samsung Galaxy S3 mini

codeanticode commented 10 years ago

Hey guys, I added some code to the config chooser to be able to create multisampled surfaces in this commit https://github.com/processing/processing-android/commit/fbb90b81227b894d6600691e9cf5b5cf9e5ee6f7, following this example from GDC 2011, but still didn't manage to make it work. On a Nexus 5 the multisampled context is created, but the graphics look all distorted. I will back to this, but now I need to work on something else. In the meantime, any suggestions are welcome!

ZachSundberg commented 10 years ago

Same problem Samsung Galaxy Tab 4.1.2. Did some digging and it looks like the problem may lie with how OpenGL-ES handles the 'smooth' qualifier: "The smooth qualifier is used to control interpolation between shader stages, GLSL ES does not support this, all vertex shader outputs are smoothly interpolated in GLSL ES." From answer 1 here: http://stackoverflow.com/questions/19802046/opengl-shadar-language-in-android

The error is being thrown form PGraphicsOpenGL.java here: @Override public void smooth() { if (quality < 2) { smooth(2); } else { smooth(quality); } }

@Override public void smooth(int level) { if (smoothDisabled) return;

smooth = true;

if (maxSamples < level) {
  if (0 < maxSamples) {
    PGraphics.showWarning(UNSUPPORTED_SMOOTH_LEVEL_ERROR, level, maxSamples);
  } else{
    PGraphics.showWarning(UNSUPPORTED_SMOOTH_ERROR);
  }
  level = maxSamples;
}

Update: Looks like the Android version may not be related to this problem at all. I tested it on a Samsung Galaxy Note running the same version of Android 4.1.2. It throws the same warning, but does not crash. When the app boots, it is clearly anti-aliasing. After the same error on a Tab 4.1.2 (the phone version) the app "white screens" and crashes. After arranging tests on a variety of devices I have come to the conclusion that the crash is occurring on small screen devices but not tablets: Samsung Galaxy S III Mini: error and crash Samsung galaxy s4 mini: error and crash Droid Maxx, Android version 4.4: error and crash SCH-R720 |ANDROID 2.3.4: error and crash Samsung Galaxy Tab 4.1.2: error and crash Samsung Galaxy Note 4.1.2: error no crash Samsung Galaxy S4: no error no crash Kindle Fire HD: no error no crash

Looking through the source it's my suspicion that the call to smooth which is occurring sets off a series of functions that leads to re-initializing the drawing surface (pgl.initSurface(quality);). On some hardware this causes a crash, on others it does not. Was there not a similar problem with PImage before?

Presuming that I am correct, the easiest way to prevent this is to allow access to: protected boolean smoothDisabled Setting this to false will dump out of the smooth(int quality) function before all of the above happens. It appears that smooth is depreciated in OPENGL-ES anyhow since quality 0 still produces at least bi-linear sampling.

Is anyone reading this?

marsCubed commented 10 years ago

It is not only phones this error is happening to.. Asus MeMo Pad 7 tablet ME173X_WW android 4.2 2 kernel 3.4.5 also reports same error in processing 2.1.1 and in the emulator too.

merlestn commented 10 years ago

I got the same problem on Nexus 7... Someone found a solution?

NathanHartkopf commented 10 years ago

Why has this been open for a year? Am I missing an answer somewhere in here?

rhwillms commented 10 years ago

It seems no one has decided to fix this serious problem. I'd like to write apps for my Nexus 7 using processing, however this is a serious impediment.

Don't any of the developers have any suggestions?

RockZou commented 10 years ago

Same problem here for almost a year. Still waiting for a solution. Please have a look at this bug or please someone post a different solution. Thank you very much!

codeanticode commented 10 years ago

Hi, I did some tests a few months ago, but was not able to fix the issue (see my previous comments from March), and since then I haven't had time to work on the android mode. My plan is to look into this again in the coming days/weeks, as we are doing some android development through Google Summer of Code.