rosjava / android_core

Android libraries for rosjava
144 stars 166 forks source link

Depth test failure #242

Open lianera opened 8 years ago

lianera commented 8 years ago

Depth test failure when render point cloud using OpenGL. It caused by org.ros.android.view.visualization.VisualizationView.java (android_15, indigo) line 80

  public void onCreate(List<Layer> layers) {
    this.layers = layers;
    setDebugFlags(DEBUG_CHECK_GL_ERROR);
    if (DEBUG) {
      // Turn on OpenGL logging.
      setDebugFlags(getDebugFlags() | DEBUG_LOG_GL_CALLS);
    }
    setEGLConfigChooser(8, 8, 8, 8, 0, 0);    <------- HERE
    getHolder().setFormat(PixelFormat.TRANSLUCENT);
    renderer = new XYOrthographicRenderer(this);
    setRenderer(renderer);
  }

The function "setEGLConfigChooser" fifth parameter is depthSize, it would be better to set this parameter 8 or 16. Reference: [setEGLConfigChooser](http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setEGLConfigChooser%28int, int, int, int, int, int%29)