congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GLException
Code IndexAdd Tabnine to your IDE (free)

How to use
GLException
in
android.opengl

Best Java code snippets using android.opengl.GLException (Showing top 4 results out of 315)

origin: MasayukiSuda/GPUVideo-android

private Bitmap createBitmapFromGLSurface(int w, int h, GL10 gl) {
  int bitmapBuffer[] = new int[w * h];
  int bitmapSource[] = new int[w * h];
  IntBuffer intBuffer = IntBuffer.wrap(bitmapBuffer);
  intBuffer.position(0);
  try {
    gl.glReadPixels(0, 0, w, h, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, intBuffer);
    int offset1, offset2, texturePixel, blue, red, pixel;
    for (int i = 0; i < h; i++) {
      offset1 = i * w;
      offset2 = (h - i - 1) * w;
      for (int j = 0; j < w; j++) {
        texturePixel = bitmapBuffer[offset1 + j];
        blue = (texturePixel >> 16) & 0xff;
        red = (texturePixel << 16) & 0x00ff0000;
        pixel = (texturePixel & 0xff00ff00) | red | blue;
        bitmapSource[offset2 + j] = pixel;
      }
    }
  } catch (GLException e) {
    Log.e("CreateBitmap", "createBitmapFromGLSurface: " + e.getMessage(), e);
    return null;
  }
  return Bitmap.createBitmap(bitmapSource, w, h, Bitmap.Config.ARGB_8888);
}
origin: zolad/BubbleTextureView

private void checkError() {
  int eglError;
  if ((eglError = mEgl10.eglGetError()) != EGL_SUCCESS) {
    String errorMessage = "eglError: " + getErrorString(eglError);
    logLine(errorMessage);
    if (mCheckError) {
      throw new GLException(eglError, errorMessage);
    }
  }
}
origin: ChillingVan/android-openGL-canvas

private void checkError() {
  int eglError;
  if ((eglError = mEgl10.eglGetError()) != EGL_SUCCESS) {
    String errorMessage = "eglError: " + getErrorString(eglError);
    logLine(errorMessage);
    if (mCheckError) {
      throw new GLException(eglError, errorMessage);
    }
  }
}
origin: MasayukiSuda/CameraRecorder-android

private Bitmap createBitmapFromGLSurface(int w, int h, GL10 gl) {
  int bitmapBuffer[] = new int[w * h];
  int bitmapSource[] = new int[w * h];
  IntBuffer intBuffer = IntBuffer.wrap(bitmapBuffer);
  intBuffer.position(0);
  try {
    gl.glReadPixels(0, 0, w, h, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, intBuffer);
    int offset1, offset2, texturePixel, blue, red, pixel;
    for (int i = 0; i < h; i++) {
      offset1 = i * w;
      offset2 = (h - i - 1) * w;
      for (int j = 0; j < w; j++) {
        texturePixel = bitmapBuffer[offset1 + j];
        blue = (texturePixel >> 16) & 0xff;
        red = (texturePixel << 16) & 0x00ff0000;
        pixel = (texturePixel & 0xff00ff00) | red | blue;
        bitmapSource[offset2 + j] = pixel;
      }
    }
  } catch (GLException e) {
    Log.e("CreateBitmap", "createBitmapFromGLSurface: " + e.getMessage(), e);
    return null;
  }
  return Bitmap.createBitmap(bitmapSource, w, h, Bitmap.Config.ARGB_8888);
}
android.openglGLException

Most used methods

  • <init>
  • getMessage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Notification (javax.management)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now