Wizcorp / Ejecta-X

A Fast, Open Source JavaScript, Canvas & Audio Implementation
http://wizcorp.github.io/Ejecta-X
185 stars 51 forks source link

FATAL EXCEPTION: GLThread when building sample project #63

Closed petejank closed 10 years ago

petejank commented 10 years ago

This is the same issue (almost) as https://github.com/Wizcorp/Ejecta-X/issues/31. Opening a new one since author of the last one didn't provide any answer.

Log:

04-17 23:06:22.553: E/AndroidRuntime(1063): FATAL EXCEPTION: GLThread 96
04-17 23:06:22.553: E/AndroidRuntime(1063): java.lang.IllegalArgumentException: No configs match configSpec
04-17 23:06:22.553: E/AndroidRuntime(1063):     at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863)
04-17 23:06:22.553: E/AndroidRuntime(1063):     at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
04-17 23:06:22.553: E/AndroidRuntime(1063):     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
04-17 23:06:22.553: E/AndroidRuntime(1063):     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

Also, what I did to "install" Ejecta:

  1. Cloned the repository
  2. Ran ndk-build in project/android
  3. Imported project into Eclipse
  4. Used "run" to build and emulate

Also checked on my mobile device. Any help would be greatly appreciated, since I'm totally, absolutely stuck.

come commented 10 years ago

hi,

Sorry because i do not have this issue, but i did something that is probably related

could you try to modify EjectaGLSurfaceView.java and put

this.setEGLConfigChooser(8, 8, 8, 8, 16, 8);

in the method : public EjectaGLSurfaceView

should be

public EjectaGLSurfaceView(Context context, int width, int height) {
        super(context);
        //Sets OpenGLES 2.0 to be used
        setEGLContextClientVersion(2);
        this.setEGLConfigChooser(8, 8, 8, 8, 16, 8);

it solve some other issues in my case ;) but i guess it s a good candidate for yours

petejank commented 10 years ago

It indeed works. Thank you my good man.

come commented 10 years ago

@petejank great!

@aogilvie may i patch sources with this line ?

NB. it also correct every use of stencil buffer in ejecta (because stencil buffer is disabled by default in android)

e.g

ctx.arc(10,10, 100, 0, Math.PI);
ctx.fill();

=> fail without this patch ;)

come commented 10 years ago

dbl click ? or still issue ?

petejank commented 10 years ago

Double click ;).