Java Code Examples for android.opengl.GLES30#GL_NO_ERROR
The following examples show how to use
android.opengl.GLES30#GL_NO_ERROR .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GlUtil.java From ShapesInOpenGLES2.0 with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 2
Source File: GlUtil.java From cineio-broadcast-android with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 3
Source File: GlUtil.java From AndroidPlayground with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 4
Source File: GlUtil.java From MockCamera with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 5
Source File: GlUtil.java From kickflip-android-sdk with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 6
Source File: GlUtil.java From IjkVRPlayer with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 7
Source File: GlUtil.java From LiveVideoBroadcaster with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 8
Source File: GlUtil.java From FuAgoraDemoDroid with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 9
Source File: GlUtil.java From VIA-AI with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 10
Source File: GLUtils.java From Fatigue-Detection with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (CHECK_GLES30) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 11
Source File: GlUtil.java From PLDroidShortVideo with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 12
Source File: GLUtils.java From In77Camera with MIT License | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (CHECK_GLES30) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 13
Source File: GLUtil.java From VideoRecorder with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 14
Source File: GlUtil.java From PhotoMovie with Apache License 2.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 15
Source File: GlUtil.java From mobile-ar-sensor-logger with GNU General Public License v3.0 | 6 votes |
/** * Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); if (false) { int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "iversion: " + majorVersion + "." + minorVersion); } } }
Example 16
Source File: GlUtil.java From sealrtc-android with MIT License | 5 votes |
/** Writes GL version info to the log. */ public static void logVersionInfo() { Log.i(TAG, "vendor : " + GLES20.glGetString(GLES20.GL_VENDOR)); Log.i(TAG, "renderer: " + GLES20.glGetString(GLES20.GL_RENDERER)); Log.i(TAG, "version : " + GLES20.glGetString(GLES20.GL_VERSION)); int[] values = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0); int majorVersion = values[0]; GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0); int minorVersion = values[0]; if (GLES30.glGetError() == GLES30.GL_NO_ERROR) { Log.i(TAG, "glVersion: " + majorVersion + "." + minorVersion); } }
Example 17
Source File: VideoRecorder.java From VideoRecorder with Apache License 2.0 | 4 votes |
/** * 渲染一帧 * * @param renderer * @param windowSurface * @return swapBuffers */ @Override public synchronized boolean onDrawFrame(CameraGLRenderer renderer, EglSurfaceBase windowSurface) { boolean swapBuffers; long startTime = System.currentTimeMillis(); //使用mSync同步锁将导致录制开始的时候卡顿一下 // && !mRequestStart && !mRequestStop if (mInputWindowSurface != null && mVideoEncoder != null && mRecordEnabled && mMuxerRunning && mPreviewState) { if (GLUtil.GL_VERSION >= 3) { windowSurface.makeCurrent(); renderer.onDrawFrame(); mInputWindowSurface.makeCurrentReadFrom(windowSurface); mVideoEncoder.frameAvailableSoon(); GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); GLUtil.checkGlError("before glBlitFramebuffer"); GLES30.glBlitFramebuffer( 0, 0, windowSurface.getWidth(), windowSurface.getHeight(), 0, 0, windowSurface.getWidth(), windowSurface.getHeight(), GLES30.GL_COLOR_BUFFER_BIT, GLES30.GL_NEAREST); int err; if ((err = GLES30.glGetError()) != GLES30.GL_NO_ERROR) { LogUtil.logw("ERROR: glBlitFramebuffer failed: 0x" + Integer.toHexString(err)); } mInputWindowSurface.swapBuffers(); windowSurface.makeCurrent(); swapBuffers = windowSurface.swapBuffers(); } else { windowSurface.makeCurrent(); renderer.onDrawFrame(); swapBuffers = windowSurface.swapBuffers(); mInputWindowSurface.makeCurrent(); mVideoEncoder.frameAvailableSoon(); renderer.onDrawFrame(); mInputWindowSurface.swapBuffers(); } } else { windowSurface.makeCurrent(); renderer.onDrawFrame(); swapBuffers = windowSurface.swapBuffers(); } LogUtil.logv("onDrawFrame ----> " + (System.currentTimeMillis() - startTime) + "ms"); if (mByteBuffer != null && mTakePicture) { mByteBuffer.rewind(); GLES20.glReadPixels(0, 0, mSize.getWidth(), mSize.getHeight(), GLES30.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, mByteBuffer); new SaveFrameTask(mSize.getWidth(), mSize.getHeight(), mPictureCallback).execute(mByteBuffer); mTakePicture = false; mPictureCallback = null; mByteBuffer = null; } return swapBuffers; }
Example 18
Source File: myRenderer.java From opengl with Apache License 2.0 | 3 votes |
/** * Utility method for debugging OpenGL calls. Provide the name of the call * just after making it: * * <pre> * mColorHandle = GLES30.glGetUniformLocation(mProgram, "vColor"); * MyGLRenderer.checkGlError("glGetUniformLocation");</pre> * * If the operation is not successful, the check throws an error. * * @param glOperation - Name of the OpenGL call to check. */ public static void checkGlError(String glOperation) { int error; while ((error = GLES30.glGetError()) != GLES30.GL_NO_ERROR) { Log.e(TAG, glOperation + ": glError " + error); throw new RuntimeException(glOperation + ": glError " + error); } }
Example 19
Source File: myRenderer.java From opengl with Apache License 2.0 | 3 votes |
/** * Utility method for debugging OpenGL calls. Provide the name of the call * just after making it: * * <pre> * mColorHandle = GLES30.glGetUniformLocation(mProgram, "vColor"); * MyGLRenderer.checkGlError("glGetUniformLocation");</pre> * * If the operation is not successful, the check throws an error. * * @param glOperation - Name of the OpenGL call to check. */ public static void checkGlError(String glOperation) { int error; while ((error = GLES30.glGetError()) != GLES30.GL_NO_ERROR) { Log.e(TAG, glOperation + ": glError " + error); throw new RuntimeException(glOperation + ": glError " + error); } }
Example 20
Source File: myRenderer.java From opengl with Apache License 2.0 | 3 votes |
/** * Utility method for debugging OpenGL calls. Provide the name of the call * just after making it: * * <pre> * mColorHandle = GLES30.glGetUniformLocation(mProgram, "vColor"); * MyGLRenderer.checkGlError("glGetUniformLocation");</pre> * * If the operation is not successful, the check throws an error. * * @param glOperation - Name of the OpenGL call to check. */ public static void checkGlError(String glOperation) { int error; while ((error = GLES30.glGetError()) != GLES30.GL_NO_ERROR) { Log.e(TAG, glOperation + ": glError " + error); throw new RuntimeException(glOperation + ": glError " + error); } }