New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't support gles2.0 error #1080

Closed
LoghamLogan opened this Issue Jul 2, 2012 · 5 comments

Comments

Projects
None yet
5 participants
@LoghamLogan

LoghamLogan commented Jul 2, 2012

I got the error "don't support gles2.0" using cocos2d-x rc0a and rc2 with GPU Emulation enabled and builds for versions 2.2 -> 4.1 as well as a physical android device running v2.3.7.

Googling revealed there is a bug that causes info.reqGIEsVersion to return 0 instead of 0x20000 for some reason.
Adding the condition "|| Build.FINGERPRINT.startsWith("generic"));" to detectOpenGLES20() solves the problem, but I'm not sure if this is just negating the original check or not.

import android.os.Build;
private boolean detectOpenGLES20()
{
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
ConfigurationInfo info = am.getDeviceConfigurationInfo();
return (info.reqGlEsVersion >= 0x20000 || Build.FINGERPRINT.startsWith("generic"));
}

Hopefully this will help anyone else who has this issue.

@folecr

This comment has been minimized.

Contributor

folecr commented Jul 2, 2012

Do you have details on which device this was?

From
http://code.google.com/p/android/issues/detail?id=29628
and
http://code.google.com/p/android/issues/detail?id=28586

... it looks like this bug is on the emulator only and has not yet been reported on devices.

@minggo

This comment has been minimized.

Contributor

minggo commented Jul 3, 2012

Googling revealed there is a bug that causes info.reqGIEsVersion to return 0 instead of 0x20000 for some reason.

Could you please paste the url?

@minggo

This comment has been minimized.

Contributor

minggo commented Jul 9, 2012

http://www.cocos2d-x.org/issues/1387 is created to track this issue.

@lmt

This comment has been minimized.

lmt commented Jul 16, 2012

Thanks DormantOden!, that line of code solves the problem for testing on the emulator (version 4.1 and gpu emulation enabled)

@ptekchand

This comment has been minimized.

Contributor

ptekchand commented Apr 12, 2013

On an x86 emulator (4.1.1), Build.FINGERPRINT was unknown for me.
Build.PRODUCT.contains("sdk") might work across more emulators.
Anyway, users might want to trace values for the static members of Build using the following gist:
https://gist.github.com/ptekchand/5370884
to choose a workaround most suitable for their environment.

Update: Some users seem to set their EGL config/context to A8R8G8B8 with 16bits for depth when running on an emulator. Patch by Romain TISSERAND/Michael Chinen:
mchinen@5ee55f6
This patch however did not work on the emulator I mentioned above. Though just using the above check for "sdk" in the PRODUCT string or using isAndroidEmulator() (from the patch link) in detectOpenGLES20() should be enough.

@minggo minggo closed this Aug 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment