简体   繁体   中英

Android opengles 20 rendering issues

I recently created a game on the android Google Play store. We´hen I released it it turned out that it doesn't render anything on a large portion of the downloaders devices. I asked a few friends if the could test it out and one of them couldn't play it.
He has a Samsung Galaxy S5 mini running Android 4.4.2, I meet with him today connected my computer and tried to find the bug. But everything seemed to be working correctly. The game went into it's update loop with all the correct values for rendering. It was allocating memory (although I'm unsure if it allocated all the memory necessery on the OpenGL thread).
My phone is running Android 4.4 and is a Samsung Galaxy S4 mini and everything works perfectly.
I'm completely lost right now and in desperate need of guidance. All my GL calls are to the GLES 20 API, could it have something to do with that.
I have a custom Config Chooser.

package com.honeycomb.touchtycube.testapp.OEngine;

import android.opengl.GLSurfaceView;


import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLDisplay;



class OEConfigChooser implements GLSurfaceView.EGLConfigChooser {

@Override
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
    int attribs[] = {
            EGL10.EGL_LEVEL, 0,
            EGL10.EGL_RENDERABLE_TYPE, 4,  // EGL_OPENGL_ES2_BIT
            EGL10.EGL_COLOR_BUFFER_TYPE, EGL10.EGL_RGB_BUFFER,
            EGL10.EGL_RED_SIZE, 8,
            EGL10.EGL_GREEN_SIZE, 8,
            EGL10.EGL_BLUE_SIZE, 8,
            EGL10.EGL_DEPTH_SIZE, 16,
            EGL10.EGL_SAMPLE_BUFFERS, 1,
            EGL10.EGL_SAMPLES, 4,  // This is for 4x MSAA.
            EGL10.EGL_NONE
    };
    EGLConfig[] configs = new EGLConfig[1];
    int[] configCounts = new int[1];
    egl.eglChooseConfig(display, attribs, configs, 1, configCounts);

    if (configCounts[0] == 0) {
        // Failed! Error handling.
        return null;
    } else {
        return configs[0];
    }
}

}

I'd like to add this config choser is almost completely from the internet and I have zero ideas of what it actually does aside from enabling MSAA.

Are there any differences in how rendering is done on these devices which could be causing this?

Best Regards //

Check for failures in shader compilation.

Shaders that work on some devices will fail to compile on others -- some devices are inappropriately lenient in what they accept.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM