Available Methods
- glBindTexture ( )
- glGetUniformLocation ( )
- glEnableVertexAttribArray ( )
- glUniformMatrix4fv ( )
- glActiveTexture ( )
- glVertexAttribPointer ( )
- glUseProgram ( )
- glGetAttribLocation ( )
- glGenTextures ( )
- glUniform1i ( )
- glTexParameteri ( )
- glClear ( )
- glDrawArrays ( )
- glUniform1f ( )
- glViewport ( )
- glDeleteProgram ( )
- glCompileShader ( )
- glBindFramebuffer ( )
- glCreateProgram ( )
- glClearColor ( )
- glCreateShader ( )
- glLinkProgram ( )
- glAttachShader ( )
- glShaderSource ( )
- glDeleteTextures ( )
- glDisableVertexAttribArray ( )
- glGetShaderiv ( )
- glGetError ( )
- glGetProgramiv ( )
- glDeleteShader ( )
- glTexParameterf ( )
- glTexImage2D ( )
- glEnable ( )
- GL_NO_ERROR
- glBlendFunc ( )
- glDeleteFramebuffers ( )
- glFramebufferTexture2D ( )
- glBindBuffer ( )
- glDisable ( )
- glGenFramebuffers ( )
- glCheckFramebufferStatus ( )
- GL_TRUE
- glUniform2f ( )
- glUniform4fv ( )
- glDrawElements ( )
- GL_FRAMEBUFFER_COMPLETE
- glReadPixels ( )
- glGetIntegerv ( )
- glBufferData ( )
- glValidateProgram ( )
- GL_TEXTURE_2D ( )
- GL_FALSE
- glUniform2fv ( )
- glFinish ( )
- glGenBuffers ( )
- glFlush ( )
- glGetShaderInfoLog ( )
- glDeleteRenderbuffers ( )
- glDeleteBuffers ( )
- glGetString ( )
- glUniform3f ( )
- glRenderbufferStorage ( )
- glFramebufferRenderbuffer ( )
- glScissor ( )
- glBindAttribLocation ( )
- glGenRenderbuffers ( )
- glPixelStorei ( )
- glUniform4f ( )
- glUniform1fv ( )
- glUniformMatrix3fv ( )
- glGetProgramInfoLog ( )
- glBindRenderbuffer ( )
- GL_UNSIGNED_BYTE
- glUniform3fv ( )
- glTexSubImage2D ( )
- glCullFace ( )
- glDepthMask ( )
- GL_NEAREST
- glLineWidth ( )
- glGenerateMipmap ( )
- GL_TEXTURE0 ( )
- GL_RGBA
- glBlendColor ( )
- glDepthFunc ( )
- GL_RGB
- glBufferSubData ( )
- GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
- GL_LINES
- glFrontFace ( )
- glIsProgram ( )
- GL_TEXTURE5 ( )
- GL_LINEAR_MIPMAP_NEAREST
- GL_FRAGMENT_SHADER
- GL_FRAMEBUFFER_UNSUPPORTED
- glUniform1iv ( )
- GL_UNSIGNED_SHORT_4_4_4_4 ( )
- GL_LINEAR
- GL_NEAREST_MIPMAP_NEAREST
- GL_FLOAT
- glIsTexture ( )
- GL_LUMINANCE
- GL_DEPTH_BUFFER_BIT
- GL_TEXTURE1 ( )
- GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
- glDetachShader ( )
- glHint ( )
- GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
- GL_TEXTURE8 ( )
- GL_LINE_LOOP
- GL_VERTEX_SHADER
- GL_TEXTURE3 ( )
- GL_TEXTURE6 ( )
- glUniform4iv ( )
- GL_DEPTH_COMPONENT16 ( )
Related Classes
- java.io.File
- java.io.InputStream
- android.content.Context
- android.util.Log
- java.io.FileOutputStream
- android.os.Build
- android.graphics.Color
- android.graphics.Canvas
- android.graphics.Bitmap
- java.nio.ByteBuffer
- android.annotation.TargetApi
- android.annotation.SuppressLint
- android.graphics.BitmapFactory
- android.os.Environment
- android.os.Looper
- java.util.logging.Level
- java.io.BufferedOutputStream
- android.graphics.RectF
- android.graphics.Matrix
- java.nio.ByteOrder
- androidx.annotation.NonNull
- android.view.Surface
- android.hardware.Camera
- java.nio.FloatBuffer
- android.graphics.SurfaceTexture
Java Code Examples for android.opengl.GLES20#GL_LINES
The following examples show how to use
android.opengl.GLES20#GL_LINES .
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: OGLESShaderRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
/*********************************************************************\ |* Render Calls *| \*********************************************************************/ public int convertElementMode(Mesh.Mode mode) { switch (mode) { case Points: return GLES20.GL_POINTS; case Lines: return GLES20.GL_LINES; case LineLoop: return GLES20.GL_LINE_LOOP; case LineStrip: return GLES20.GL_LINE_STRIP; case Triangles: return GLES20.GL_TRIANGLES; case TriangleFan: return GLES20.GL_TRIANGLE_FAN; case TriangleStrip: return GLES20.GL_TRIANGLE_STRIP; default: throw new UnsupportedOperationException("Unrecognized mesh mode: " + mode); } }
Example 2
Source File: NewGridFeature.java From geoar-app with Apache License 2.0 | 4 votes |
public NewGridFeature(FeatureShader renderer) { this.totalSize = 200; this.gridSize = 2; this.drawingMode = GLES20.GL_LINES; this.renderer = renderer; }
Example 3
Source File: ReferencedGridFeature.java From geoar-app with Apache License 2.0 | 4 votes |
public ReferencedGridFeature() { // HeightMap map = new HeightMap(); // addChild(map); // setPosition(new float[]{0f,0.00001f,0f}); int xLength = 64; int yLength = 64; final int floatsPerVertex = 3; final int floatsPerColor = 4; final int floatsPerNormal = 3; final float[] vertices = new float[xLength * yLength * floatsPerVertex]; final float[] colors = new float[xLength * yLength * floatsPerColor]; final float[] normals = new float[xLength * yLength * floatsPerNormal]; int offset = 0; int normalOffSet = 0; int colorOffset = 0; for (int y = 0; y < yLength; y++) { for (int x = 0; x < xLength; x++) { final float xRatio = x / (float) (xLength - 1); // Build our heightmap from the top down, so that our // triangles are counter-clockwise. final float yRatio = 1f - (y / (float) (yLength - 1)); final float xPosition = MIN_POSITION + (xRatio * POSITION_RANGE); final float yPosition = MIN_POSITION + (yRatio * POSITION_RANGE); vertices[offset++] = xPosition; vertices[offset++] = ((xPosition * xPosition) + (yPosition * yPosition)) / 20f; vertices[offset++] = yPosition; final float xSlope = (2 * xPosition) / 10f; final float ySlope = (2 * yPosition) / 10f; // Calculate the normal using the cross product of the // slopes. final float[] planeVectorX = { 1f, 0f, xSlope }; final float[] planeVectorY = { 0f, 1f, ySlope }; final float[] normalVector = { (planeVectorX[1] * planeVectorY[2]) - (planeVectorX[2] * planeVectorY[1]), (planeVectorX[2] * planeVectorY[0]) - (planeVectorX[0] * planeVectorY[2]), (planeVectorX[0] * planeVectorY[1]) - (planeVectorX[1] * planeVectorY[0]) }; // Normalize the normal final float length = Matrix.length(normalVector[0], normalVector[1], normalVector[2]); normals[normalOffSet++] = normalVector[0] / length; normals[normalOffSet++] = normalVector[1] / length; normals[normalOffSet++] = normalVector[2] / length; colors[colorOffset++] = 1.f; colors[colorOffset++] = 0.5f; colors[colorOffset++] = 0.5f; colors[colorOffset++] = 0.5f; } } // Now build the index data final int numStripsRequired = yLength - 1; final int numDegensRequired = 2 * (numStripsRequired - 1); final int verticesPerStrip = 2 * xLength - 1; final short[] heightMapIndexData = new short[(verticesPerStrip * verticesPerStrip)]; offset = 0; for (int y = 0; y < yLength; y++) { for (int x = 0; x < xLength - 1; x++) { heightMapIndexData[offset++] = (short) ((y * yLength) + x); heightMapIndexData[offset++] = (short) ((y * yLength) + x + 1); } } for (int x = 0; x < xLength; x++) { for (int y = 0; y < yLength - 1; y++) { heightMapIndexData[offset++] = (short) ((y * yLength) + x); heightMapIndexData[offset++] = (short) (((y + 1) * yLength) + x); } } renderer = BilligerColorShader.getInstance(); drawingMode = GLES20.GL_LINES; setRenderObjectives(vertices, colors, normals, null, heightMapIndexData); }