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

How to use
GLES30
in
android.opengl

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

origin: libgdx/libgdx

@Override
public void glBindVertexArray (int array) {
  GLES30.glBindVertexArray(array);
}
origin: libgdx/libgdx

@Override
public void glGenVertexArrays (int n, int[] arrays, int offset) {
  GLES30.glGenVertexArrays(n, arrays, offset);
}
origin: libgdx/libgdx

@Override
public String glGetStringi (int name, int index) {
  return GLES30.glGetStringi(name, index);
}
origin: glumes/AndroidOpenGLTutorial

public static int linkProgram(int vertexShaderId, int fragmentShaderId) {
  final int programObjectId = glCreateProgram();
  if (programObjectId == 0) {
    Timber.d("Could not create new program");
    return 0;
  }
  glAttachShader(programObjectId, vertexShaderId);
  glAttachShader(programObjectId, fragmentShaderId);
  glLinkProgram(programObjectId);
  final int[] linkStatus = new int[1];
  glGetProgramiv(programObjectId, GL_LINK_STATUS, linkStatus, 0);
  Timber.d("Result of linking program:\n" + glGetProgramInfoLog(programObjectId));
  if (linkStatus[0] == 0) {
    glDeleteProgram(programObjectId);
    Timber.d("Linking of program failed");
    return 0;
  }
  return programObjectId;
}
origin: glumes/AndroidOpenGLTutorial

  public void drawSelf(int texId) {
    //指定使用某套着色器程序
    GLES30.glUseProgram(mProgram);
    //将最终变换矩阵传入渲染管线
    GLES30.glActiveTexture(GLES30.GL_TEXTURE0);
    GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, texId);

    GLES30.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, MatrixState.getFinalMatrix(), 0);


    GLES30.glBindVertexArray(mVAOId);

    GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, mIndicesBufferId);


    //绑定纹理
    GLES30.glDrawElements(GLES30.GL_TRIANGLES, vCount, GLES30.GL_UNSIGNED_BYTE, 0);

//        GLES30.glDrawArrays(GLES30.GL_TRIANGLES, 0, vCount);

    GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, 0);


    GLES30.glBindVertexArray(0);

  }
}
origin: glumes/AndroidOpenGLTutorial

GLES30.glUseProgram(mProgram);
GLES30.glUniformMatrix4fv(mModelMatrixHandle, 1, false, model, 0);
glUniform4f(maColorHandle, 0.0f, 1.0f, 1.0f, 1.0f);
GLES30.glEnableVertexAttribArray(maPositionHandle);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mVertexBufferId);
GLES30.glVertexAttribPointer(maPositionHandle, 3, GLES30.GL_FLOAT, false, 3 * 4, 0);
GLES30.glEnableVertexAttribArray(uMatrixLocation1);
GLES30.glEnableVertexAttribArray(uMatrixLocation2);
GLES30.glEnableVertexAttribArray(uMatrixLocation3);
GLES30.glEnableVertexAttribArray(uMatrixLocation4);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mModelBufferId);
GLES30.glVertexAttribPointer(uMatrixLocation1, 4, GLES30.GL_FLOAT, false, 4 * 4, 0);
GLES30.glVertexAttribPointer(uMatrixLocation2, 4, GLES30.GL_FLOAT, false, 4 * 4, 4);
GLES30.glVertexAttribPointer(uMatrixLocation3, 4, GLES30.GL_FLOAT, false, 4 * 4, 8);
GLES30.glVertexAttribPointer(uMatrixLocation4, 4, GLES30.GL_FLOAT, false, 4 * 4, 12);
GLES30.glVertexAttribDivisor(uMatrixLocation1,1);
GLES30.glVertexAttribDivisor(uMatrixLocation2,2);
GLES30.glVertexAttribDivisor(uMatrixLocation3,3);
GLES30.glVertexAttribDivisor(uMatrixLocation4,4);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);
origin: glumes/AndroidOpenGLTutorial

  public void initVAO() {

    int[] vaoIds = new int[1];

    GLES30.glGenVertexArrays(1, vaoIds, 0);

    mVAOId = vaoIds[0];

    GLES30.glBindVertexArray(mVAOId);


    GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mVertexBufferId);
    GLES30.glEnableVertexAttribArray(maPositionHandle);
    GLES30.glVertexAttribPointer(maPositionHandle, 3, GLES30.GL_FLOAT, false, 3 * 4, 0);
    GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);

    GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mTextureBufferId);
    GLES30.glEnableVertexAttribArray(maTexCoorHandle);
    GLES30.glVertexAttribPointer(maTexCoorHandle, 2, GLES30.GL_FLOAT, false, 2 * 4, 0);
    GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);


//        GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, mIndicesBufferId);
//        GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, 0);


    GLES30.glBindVertexArray(0);

  }

origin: glumes/AndroidOpenGLTutorial

GLES30.glGenBuffers(3, bufferIds, 0);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mVertexBufferId);
GLES30.glBufferData(GLES30.GL_ARRAY_BUFFER, vertices.length * 4, mVertexBuffer, GLES30.GL_STATIC_DRAW);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, mTextureBufferId);
GLES30.glBufferData(GLES30.GL_ARRAY_BUFFER, textures.length * 4, mTextureBuffer, GLES30.GL_STATIC_DRAW);
GLES30.glBindBuffer(GLES30.GL_ARRAY_BUFFER, 0);
GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, mIndicesBufferId);
GLES30.glBufferData(GLES30.GL_ELEMENT_ARRAY_BUFFER, indices.length, mIndicesBuffer, GLES30.GL_STATIC_DRAW);
GLES30.glBindBuffer(GLES30.GL_ELEMENT_ARRAY_BUFFER, 0);
origin: novoda/spikes

texture = new int[bufferCount];
bufferUsed = new Boolean[bufferCount];
GLES30.glGenBuffers(bufferCount, pbo, 0);
GLES20.glGenFramebuffers(bufferCount, frameBuffer, 0);
GLES20.glGenTextures(bufferCount, texture, 0);
 GLES30.glTexImage2D(
   GLES30.GL_TEXTURE_2D,
   0,
 GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, pbo[i]);
 GLES30.glBufferData(
   GLES30.GL_PIXEL_PACK_BUFFER, pixelBufferSize, null, GLES30.GL_DYNAMIC_READ);
 GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, 0);
origin: skyfe79/LearningOpenGLES2-Android

private void beginVAO() {
  IntBuffer vaoIdBuffer = IntBuffer.allocate(1);
  GLES30.glGenVertexArrays(1, vaoIdBuffer);
  vaoId = vaoIdBuffer.get(0);
  GLES30.glBindVertexArray(vaoId);
}
origin: sriharshachilakapati/SilenceEngine

@Override
public int glGetError()
{
  return GLES30.glGetError();
}
origin: novoda/spikes

GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, pbo[bufferIndex]);
GLES30.glReadBuffer(GLES30.GL_COLOR_ATTACHMENT0);
GLES30.glReadPixels(
  0,
  0,
GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, 0);
origin: saki4510t/libcommon

/**
 * Writes GL version info to the log.
 */
@SuppressLint("InlinedApi")
public static void logVersionInfo() {
  Log.i(TAG, "vendor  : " + GLES10.glGetString(GLES10.GL_VENDOR));
  Log.i(TAG, "renderer: " + GLES10.glGetString(GLES10.GL_RENDERER));
  Log.i(TAG, "version : " + GLES10.glGetString(GLES10.GL_VERSION));
  if (BuildCheck.isAndroid4_3()) {
    final int[] values = new int[1];
    GLES30.glGetIntegerv(GLES30.GL_MAJOR_VERSION, values, 0);
    final int majorVersion = values[0];
    GLES30.glGetIntegerv(GLES30.GL_MINOR_VERSION, values, 0);
    final int minorVersion = values[0];
    if (GLES30.glGetError() == GLES30.GL_NO_ERROR) {
      Log.i(TAG, "version: " + majorVersion + "." + minorVersion);
    }
  }
}
origin: novoda/spikes

/**
 * Releases a previously requested frame buffer. If input buffer index is invalid, an exception
 * will be thrown.
 *
 * @param bufferIndex the index to the frame buffer to be acquired. It has to be a frame index
 *     returned from submitFrame().
 */
public void releaseFrame(int bufferIndex) {
 if (bufferIndex < 0 || bufferIndex >= bufferCount || !bufferUsed[bufferIndex]) {
  throw new RuntimeException("Invalid buffer index.");
 }
 GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, pbo[bufferIndex]);
 GLES30.glUnmapBuffer(GLES30.GL_PIXEL_PACK_BUFFER);
 GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, 0);
 bufferUsed[bufferIndex] = false;
}
origin: googlecreativelab/shadercam

GLES30.glBlitFramebuffer(
    0, 0, mWindowSurface.getWidth(), mWindowSurface.getHeight(),
    0, 0, mRecordSurface.getWidth(), mRecordSurface.getHeight(), //must match the mediarecorder surface size
if ((err = GLES30.glGetError()) != GLES30.GL_NO_ERROR)
  Log.w(TAG, "ERROR: glBlitFramebuffer failed: 0x" + Integer.toHexString(err));
origin: SachinVin/citra_android

public boolean SupportsExtension(String extension)
{
 int[] num_ext = new int[1];
 GLES30.glGetIntegerv(GLES30.GL_NUM_EXTENSIONS, num_ext, 0);
 for (int i = 0; i < num_ext[0]; ++i)
 {
  String ext = GLES30.glGetStringi(GLES30.GL_EXTENSIONS, i);
  if (ext.equals(extension))
   return true;
 }
 return false;
}
origin: novoda/spikes

/**
 * Acquires the frame requested earlier. This routine returns a TextureReaderImage object that
 * contains the pixels mapped to the frame buffer requested previously through submitFrame().
 *
 * <p>If input buffer index is invalid, an exception will be thrown.
 *
 * @param bufferIndex the index to the frame buffer to be acquired. It has to be a frame index
 *     returned from submitFrame().
 * @return a TextureReaderImage object if succeed. Null otherwise.
 */
public TextureReaderImage acquireFrame(int bufferIndex) {
 if (bufferIndex < 0 || bufferIndex >= bufferCount || !bufferUsed[bufferIndex]) {
  throw new RuntimeException("Invalid buffer index.");
 }
 // Bind the current PB and acquire the pixel buffer.
 GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, pbo[bufferIndex]);
 ByteBuffer mapped =
   (ByteBuffer)
     GLES30.glMapBufferRange(
       GLES30.GL_PIXEL_PACK_BUFFER, 0, pixelBufferSize, GLES30.GL_MAP_READ_BIT);
 // Wrap the mapped buffer into TextureReaderImage object.
 TextureReaderImage buffer =
   new TextureReaderImage(imageWidth, imageHeight, imageFormat, mapped);
 return buffer;
}
origin: sriharshachilakapati/SilenceEngine

@Override
public void glBufferData(int target, int capacity, int usage)
{
  GLES30.glBufferData(target, capacity, null, usage);
}
origin: sriharshachilakapati/SilenceEngine

@Override
public void glBindBuffer(int target, int buffer)
{
  GLES30.glBindBuffer(target, buffer);
}
origin: sriharshachilakapati/SilenceEngine

@Override
public int glGenBuffers()
{
  int[] buffer = new int[1];
  GLES30.glGenBuffers(1, buffer, 0);
  return buffer[0];
}
android.openglGLES30

Most used methods

  • glBindVertexArray
  • glGenVertexArrays
  • glGetError
  • glBindBuffer
  • glBufferData
  • glGenBuffers
  • glGetStringi
  • glAttachShader
  • glBeginQuery
  • glBlitFramebuffer
  • glCompileShader
  • glCreateProgram
  • glCompileShader,
  • glCreateProgram,
  • glCreateShader,
  • glDeleteProgram,
  • glDeleteShader,
  • glDeleteVertexArrays,
  • glDrawArrays,
  • glEnableVertexAttribArray,
  • glEndQuery,
  • glGenQueries

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Best IntelliJ plugins
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