Java 类android.opengl.GLDebugHelper 实例源码

项目:alpha-movie    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLSurfaceViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:EZFilter    文件:GLSurfaceView.java   
/**
 * Create a GL object for the current EGL context.
 *
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLSurfaceView view = mGLSurfaceViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:EZFilter    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 *
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:android-RoundedTextureView    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 */
GL createGL() {

  GL gl = eglContext.getGL();
  GLTextureView view = glTextureViewWeakRef.get();
  if (view != null) {
    if (view.glWrapper != null) {
      gl = view.glWrapper.wrap(gl);
    }

    if ((view.debugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
      int configFlags = 0;
      Writer log = null;
      if ((view.debugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
        configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
      }
      if ((view.debugFlags & DEBUG_LOG_GL_CALLS) != 0) {
        log = new LogWriter();
      }
      gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
  }
  return gl;
}
项目:md360    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:ParticleView    文件:GlTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GlTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:MD360Player4Android    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:ZGDanmaku    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:AndroidLiveWallpaperHelloWorld    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:ActionLauncherApi    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:libgdxcn    文件:GLSurfaceViewAPI18.java   
/**
 * Create a GL object for the current EGL context.
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLSurfaceViewAPI18 view = mGLSurfaceViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:FxCameraApp    文件:GlTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    final GlTextureView view = mGLSurfaceViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter(GlTextureView.TAG);
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:muzei    文件:GLTextureView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLTextureView view = mGLTextureViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:replica-RPG    文件:GLSurfaceView.java   
/**
 * Create a GL object for the current EGL context.
 * @return
 */
GL createGL() {

    GL gl = mEglContext.getGL();
    GLSurfaceView view = mGLSurfaceViewWeakRef.get();
    if (view != null) {
        if (view.mGLWrapper != null) {
            gl = view.mGLWrapper.wrap(gl);
        }

        if ((view.mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
            int configFlags = 0;
            Writer log = null;
            if ((view.mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
                configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
            }
            if ((view.mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
                log = new LogWriter();
            }
            gl = GLDebugHelper.wrap(gl, configFlags, log);
        }
    }
    return gl;
}
项目:android-openGL-canvas    文件:EGLLogWrapper.java   
public EGLLogWrapper(EGL egl, int configFlags, Writer log) {
    mEgl10 = (EGL10) egl;
    mLog = log;
    mLogArgumentNames =
            (GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES & configFlags) != 0;
    mCheckError =
            (GLDebugHelper.CONFIG_CHECK_GL_ERROR & configFlags) != 0;
}
项目:apps-for-android    文件:TriangleActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mGLView = (GLView) findViewById(R.id.glview);

    if (DEBUG_CHECK_GL_ERROR) {
        mGLView.setGLWrapper(new GLView.GLWrapper() {
            public GL wrap(GL gl) {
                return GLDebugHelper.wrap(gl, GLDebugHelper.CONFIG_CHECK_GL_ERROR, null);
            }});
    }
    mGLView.setRenderer(new TriangleRenderer(this));
    mGLView.requestFocus();
}
项目:360-Video-Player-for-Android    文件:RajawaliGLDebugger.java   
private RajawaliGLDebugger(int config, GL gl, EGL egl) {
    mConfig = config;
    mWriter = new Writer() {

        @Override
        public void close() throws IOException {
            flushBuilder();
        }

        @Override
        public void flush() throws IOException {
            flushBuilder();
        }

        @Override
        public void write(char[] buf, int offset, int count) throws IOException {
            for (int i = 0; i < count; i++) {
                char c = buf[offset + i];
                if (c == '\n') {
                    flushBuilder();
                } else {
                    mBuilder.append(c);
                }
            }
        }

        private void flushBuilder() {
            if (mBuilder.length() > 0) {
                RajLog.v(mBuilder.toString());
                mBuilder.delete(0, mBuilder.length());
            }
        }
    };

    mGL = (gl != null) ? (GL10) GLDebugHelper.wrap(gl, config, mWriter) : null;
    mEGL = (egl != null) ? GLDebugHelper.wrap(egl, config, mWriter) : null;
}
项目:VR-Defense-Game    文件:GLDebugger.java   
private GLDebugger(int config, GL gl, EGL egl) {
    mConfig = config;
    mWriter = new Writer() {

        @Override
        public void close() throws IOException {
            flushBuilder();
        }

        @Override
        public void flush() throws IOException {
            flushBuilder();
        }

        @Override
        public void write(char[] buf, int offset, int count) throws IOException {
            for (int i = 0; i < count; i++) {
                char c = buf[offset + i];
                if (c == '\n') {
                    flushBuilder();
                } else {
                    mBuilder.append(c);
                }
            }
        }

        private void flushBuilder() {
            if (mBuilder.length() > 0) {
                RajLog.v(mBuilder.toString());
                mBuilder.delete(0, mBuilder.length());
            }
        }
    };

    mGL = (gl != null) ? (GL10) GLDebugHelper.wrap(gl, config, mWriter) : null;
    mEGL = (egl != null) ? GLDebugHelper.wrap(egl, config, mWriter) : null;
}
项目:opengl    文件:BasicGL.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:SimpleFPSDisplay.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:TextureGL.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:SimpleLitGLCube.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:BasicGLCube.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:BasicGL.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:SimpleFPSDisplay.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:TextureGL.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:SimpleLitGLCube.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:opengl    文件:BasicGLCube.java   
public void initEGL() {
    mEGL = (EGL10) GLDebugHelper.wrap(EGLContext.getEGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD,  null);

    mGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    int[] curGLVersion = new int[2];
    mEGL.eglInitialize(mGLDisplay, curGLVersion);

    Log.i("GL", "GL version = " + curGLVersion[0] + "."
            + curGLVersion[1]);

    EGLConfig[] configs = new EGLConfig[1];
    int[] num_config = new int[1];
    mEGL.eglChooseConfig(mGLDisplay, mConfigSpec, configs, 1,
            num_config);
    mGLConfig = configs[0];

    mGLSurface = mEGL.eglCreateWindowSurface(mGLDisplay, mGLConfig, sv
            .getHolder(), null);

    mGLContext = mEGL.eglCreateContext(mGLDisplay, mGLConfig,
            EGL10.EGL_NO_CONTEXT, null);

    mEGL.eglMakeCurrent(mGLDisplay, mGLSurface, mGLSurface, mGLContext);
    mGL = (GL10) GLDebugHelper.wrap(mGLContext.getGL(),
            GLDebugHelper.CONFIG_CHECK_GL_ERROR
                    | GLDebugHelper.CONFIG_CHECK_THREAD
                    | GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES, null);
}
项目:replicaisland    文件:GLSurfaceView.java   
public GL createSurface(SurfaceHolder holder) {
    /*
     *  The window size has changed, so we need to create a new
     *  surface.
     */
    if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {

        /*
         * Unbind and destroy the old EGL surface, if
         * there is one.
         */
        mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);
    }

    /*
     * Create an EGL surface we can render into.
     */
    mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

    if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
        throwEglException("createWindowSurface");
    }

    /*
     * Before we can issue GL commands, we need to make sure
     * the context is current and bound to a surface.
     */
    if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
        throwEglException("eglMakeCurrent");
    }

    GL gl = mEglContext.getGL();
    if (mGLWrapper != null) {
        gl = mGLWrapper.wrap(gl);
    }

    if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
        int configFlags = 0;
        Writer log = null;
        if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
            configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
        }
        if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
            log = new LogWriter();
        }
        gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
    return gl;
}
项目:360-Video-Player-for-Android    文件:RajawaliGLDebugger.java   
/**
 * Enables a {@code glError()} check after every GL/EGL call.
 */
public void checkAllGLErrors() {
    mBuilderConfig |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
}
项目:360-Video-Player-for-Android    文件:RajawaliGLDebugger.java   
/**
 * Enables a checking for all GL calls being on the same thread.
 */
public void checkSameThread() {
    mBuilderConfig |= GLDebugHelper.CONFIG_CHECK_THREAD;
}
项目:360-Video-Player-for-Android    文件:RajawaliGLDebugger.java   
/**
 * Enables logging of argument names when logging GL calls.
 */
public void enableLogArgumentNames() {
    mBuilderConfig |= GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES;
}
项目:VR-Defense-Game    文件:GLDebugger.java   
/**
 * Enables a {@code glError()} check after every GL/EGL call.
 */
public void checkAllGLErrors() {
    mBuilderConfig |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
}
项目:VR-Defense-Game    文件:GLDebugger.java   
/**
 * Enables a checking for all GL calls being on the same thread.
 */
public void checkSameThread() {
    mBuilderConfig |= GLDebugHelper.CONFIG_CHECK_THREAD;
}
项目:VR-Defense-Game    文件:GLDebugger.java   
/**
 * Enables logging of argument names when logging GL calls.
 */
public void enableLogArgumentNames() {
    mBuilderConfig |= GLDebugHelper.CONFIG_LOG_ARGUMENT_NAMES;
}
项目:platform-external-replicaisland    文件:GLSurfaceView.java   
public GL createSurface(SurfaceHolder holder) {
    /*
     *  The window size has changed, so we need to create a new
     *  surface.
     */
    if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {

        /*
         * Unbind and destroy the old EGL surface, if
         * there is one.
         */
        mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);
    }

    /*
     * Create an EGL surface we can render into.
     */
    mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

    if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
        throwEglException("createWindowSurface");
    }

    /*
     * Before we can issue GL commands, we need to make sure
     * the context is current and bound to a surface.
     */
    if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
        throwEglException("eglMakeCurrent");
    }

    GL gl = mEglContext.getGL();
    if (mGLWrapper != null) {
        gl = mGLWrapper.wrap(gl);
    }

    if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
        int configFlags = 0;
        Writer log = null;
        if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
            configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
        }
        if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
            log = new LogWriter();
        }
        gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
    return gl;
}
项目:AugmentedOxford    文件:ReplicaGLSurfaceView.java   
public GL createSurface(SurfaceHolder holder) {
    /*
     * The window size has changed, so we need to create a new surface.
     */
    if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {

        /*
         * Unbind and destroy the old EGL surface, if there is one.
         */
        mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay,
                mEglSurface);
    }

    /*
     * Create an EGL surface we can render into.
     */
    mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

    if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
        throwEglException("createWindowSurface");
    }

    /*
     * Before we can issue GL commands, we need to make sure the context
     * is current and bound to a surface.
     */
    if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
            mEglContext)) {
        throwEglException("eglMakeCurrent");
    }

    GL gl = mEglContext.getGL();
    if (mGLWrapper != null) {
        gl = mGLWrapper.wrap(gl);
    }

    if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
        int configFlags = 0;
        Writer log = null;
        if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
            configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
        }
        if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
            log = new LogWriter();
        }
        gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
    return gl;
}
项目:gloomy-dungeons-2    文件:GLSurfaceView21.java   
public GL createSurface(SurfaceHolder holder) {
    /*
     *  The window size has changed, so we need to create a new
     *  surface.
     */
    if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {

        /*
         * Unbind and destroy the old EGL surface, if
         * there is one.
         */
        mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);
    }

    /*
     * Create an EGL surface we can render into.
     */
    mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

    if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
        throwEglException("createWindowSurface");
    }

    /*
     * Before we can issue GL commands, we need to make sure
     * the context is current and bound to a surface.
     */
    if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
        throwEglException("eglMakeCurrent");
    }

    GL gl = mEglContext.getGL();
    if (mGLWrapper != null) {
        gl = mGLWrapper.wrap(gl);
    }

    if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
        int configFlags = 0;
        Writer log = null;
        if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
            configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
        }
        if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
            log = new LogWriter();
        }
        gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
    return gl;
}
项目:platform-external-replicaisland    文件:GLSurfaceView.java   
public GL createSurface(SurfaceHolder holder) {
    /*
     *  The window size has changed, so we need to create a new
     *  surface.
     */
    if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {

        /*
         * Unbind and destroy the old EGL surface, if
         * there is one.
         */
        mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
                EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
        mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);
    }

    /*
     * Create an EGL surface we can render into.
     */
    mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

    if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
        throwEglException("createWindowSurface");
    }

    /*
     * Before we can issue GL commands, we need to make sure
     * the context is current and bound to a surface.
     */
    if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
        throwEglException("eglMakeCurrent");
    }

    GL gl = mEglContext.getGL();
    if (mGLWrapper != null) {
        gl = mGLWrapper.wrap(gl);
    }

    if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
        int configFlags = 0;
        Writer log = null;
        if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
            configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
        }
        if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
            log = new LogWriter();
        }
        gl = GLDebugHelper.wrap(gl, configFlags, log);
    }
    return gl;
}
项目:ReplicaIsland    文件:GLSurfaceView.java   
public GL createSurface(SurfaceHolder holder) {
     /*
      * The window size has changed, so we need to create a new
      * surface.
      */
     if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {
/*
 * Unbind and destroy the old EGL surface, if
 * there is one.
 */
mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE,
            EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
mEGLWindowSurfaceFactory.destroySurface(mEgl, mEglDisplay, mEglSurface);
     }

     /*
      * Create an EGL surface we can render into.
      */
     mEglSurface = mEGLWindowSurfaceFactory.createWindowSurface(mEgl,
            mEglDisplay, mEglConfig, holder);

     if (mEglSurface == null || mEglSurface == EGL10.EGL_NO_SURFACE) {
throwEglException("createWindowSurface");
     }

     /*
      * Before we can issue GL commands, we need to make sure
      * the context is current and bound to a surface.
      */
     if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
throwEglException("eglMakeCurrent");
     }

     GL gl = mEglContext.getGL();
     if (mGLWrapper != null) {
gl = mGLWrapper.wrap(gl);
     }

     if ((mDebugFlags & (DEBUG_CHECK_GL_ERROR | DEBUG_LOG_GL_CALLS)) != 0) {
int configFlags = 0;
Writer log = null;
if ((mDebugFlags & DEBUG_CHECK_GL_ERROR) != 0) {
  configFlags |= GLDebugHelper.CONFIG_CHECK_GL_ERROR;
}
if ((mDebugFlags & DEBUG_LOG_GL_CALLS) != 0) {
  log = new LogWriter();
}
gl = GLDebugHelper.wrap(gl, configFlags, log);
     }
     return gl;
   }