/frameworks/rs/java/tests/GenImages/src/com/android/rs/genimage/ |
D | GenImage.java | 34 import android.opengl.GLES20; 59 GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); in onSurfaceCreated() 68 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 78 GLES20.glViewport(0, 0, 512, 512); in onSurfaceChanged() 85 int shader = GLES20.glCreateShader(type); in loadShader() 88 GLES20.glShaderSource(shader, shaderCode); in loadShader() 89 GLES20.glCompileShader(shader); in loadShader() 157 … GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST); in setup() 160 … GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); in setup() 167 … GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST); in setup() [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | GLToolbox.java | 20 import android.opengl.GLES20; 39 return GLES20.glIsTexture(texId); in isTexture() 45 GLES20.glDeleteTextures(1, textures, 0); in deleteTexture() 52 GLES20.glDeleteFramebuffers(1, fbos, 0); in deleteFbo() 58 GLES20.glGenTextures(1, textures, 0); in generateTexture() 65 GLES20.glGenFramebuffers(1, fbos, 0); in generateFbo() 71 GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboId); in readFbo() 72 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pixels); in readFbo() 78 GLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, pixels); in readTarget() 84 GLES20.glGetFramebufferAttachmentParameteriv( in attachedTexture() [all …]
|
D | ImageShader.java | 20 import android.opengl.GLES20; 46 private int mSFactor = GLES20.GL_SRC_ALPHA; 47 private int mDFactor = GLES20.GL_ONE_MINUS_SRC_ALPHA; 48 private int mDrawMode = GLES20.GL_TRIANGLE_STRIP; 50 private int mBaseTexUnit = GLES20.GL_TEXTURE0; 51 private int mClearBuffers = GLES20.GL_COLOR_BUFFER_BIT; 126 GLES20.glVertexAttrib1fv(mIndex, mValues); in push() 129 GLES20.glVertexAttrib2fv(mIndex, mValues); in push() 132 GLES20.glVertexAttrib3fv(mIndex, mValues); in push() 135 GLES20.glVertexAttrib4fv(mIndex, mValues); in push() [all …]
|
D | TextureSource.java | 21 import android.opengl.GLES20; 37 return new TextureSource(texId, GLES20.GL_TEXTURE_2D, false); in fromTexture() 41 return new TextureSource(GLToolbox.generateTexture(), GLES20.GL_TEXTURE_2D, true); in newTexture() 59 GLES20.glBindTexture(mTarget, mTexId); in bind() 82 GLES20.glBindTexture(mTarget, mTexId); in generateMipmaps() 83 GLES20.glTexParameteri(mTarget, in generateMipmaps() 84 GLES20.GL_TEXTURE_MIN_FILTER, in generateMipmaps() 85 GLES20.GL_LINEAR_MIPMAP_LINEAR); in generateMipmaps() 86 GLES20.glGenerateMipmap(mTarget); in generateMipmaps() 87 GLES20.glBindTexture(mTarget, 0); in generateMipmaps() [all …]
|
D | RenderTarget.java | 22 import android.opengl.GLES20; 107 GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fbo); in forTexture() 109 GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, in forTexture() 110 GLES20.GL_COLOR_ATTACHMENT0, in forTexture() 218 GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFbo); in focus() 398 GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, result, 0); in getCurrentFbo()
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | GLDepthTestActivity.java | 27 import android.opengl.GLES20; 135 GLES20.glClearColor(0.0f, 0.0f, 1.0f, 1.0f); in onDrawFrame() 137 GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 139 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 141 GLES20.glUseProgram(mProgram); in onDrawFrame() 143 GLES20.glEnable(GLES20.GL_DEPTH_TEST); in onDrawFrame() 145 GLES20.glDisable(GLES20.GL_DEPTH_TEST); in onDrawFrame() 149 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); in onDrawFrame() 150 GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureID); in onDrawFrame() 153 GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, in onDrawFrame() [all …]
|
D | SingleFrameTextureViewTestActivity.java | 19 import static android.opengl.GLES20.GL_COLOR_BUFFER_BIT; 20 import static android.opengl.GLES20.glClear; 21 import static android.opengl.GLES20.glClearColor;
|
/frameworks/wilhelm/tests/native-media/src/com/example/nativemedia/ |
D | MyGLSurfaceView.java | 32 import android.opengl.GLES20; 107 GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 108 GLES20.glUseProgram(mProgram); in onDrawFrame() 111 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); in onDrawFrame() 112 GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID); in onDrawFrame() 115 GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, in onDrawFrame() 118 GLES20.glEnableVertexAttribArray(maPositionHandle); in onDrawFrame() 122 GLES20.glVertexAttribPointer(maTextureHandle, 3, GLES20.GL_FLOAT, false, in onDrawFrame() 125 GLES20.glEnableVertexAttribArray(maTextureHandle); in onDrawFrame() 131 GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0); in onDrawFrame() [all …]
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | ColorFade.java | 37 import android.opengl.GLES20; 205 int shader = GLES20.glCreateShader(type); in loadShader() 207 GLES20.glShaderSource(shader, source); in loadShader() 208 GLES20.glCompileShader(shader); in loadShader() 211 GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); in loadShader() 214 Slog.e(TAG, GLES20.glGetShaderSource(shader)); in loadShader() 215 Slog.e(TAG, GLES20.glGetShaderInfoLog(shader)); in loadShader() 216 GLES20.glDeleteShader(shader); in loadShader() 225 GLES20.GL_VERTEX_SHADER); in initGLShaders() 227 GLES20.GL_FRAGMENT_SHADER); in initGLShaders() [all …]
|
/frameworks/native/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/ |
D | GL2CameraEye.java | 34 import android.opengl.GLES20; 200 GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 201 GLES20.glUseProgram(mProgram); in onDrawFrame() 204 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); in onDrawFrame() 205 GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTextureID); in onDrawFrame() 208 GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, in onDrawFrame() 211 GLES20.glEnableVertexAttribArray(maPositionHandle); in onDrawFrame() 215 GLES20.glVertexAttribPointer(maTextureHandle, 3, GLES20.GL_FLOAT, false, in onDrawFrame() 218 GLES20.glEnableVertexAttribArray(maTextureHandle); in onDrawFrame() 224 GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mMVPMatrix, 0); in onDrawFrame() [all …]
|
/frameworks/native/opengl/tests/gl2_java/src/com/android/gl2java/ |
D | GL2JavaView.java | 36 import android.opengl.GLES20; 65 GLES20.glClearColor(0.0f, 0.0f, 1.0f, 1.0f); in onDrawFrame() 66 GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 67 GLES20.glUseProgram(mProgram); in onDrawFrame() 70 … GLES20.glVertexAttribPointer(mvPositionHandle, 2, GLES20.GL_FLOAT, false, 0, mTriangleVertices); in onDrawFrame() 72 GLES20.glEnableVertexAttribArray(mvPositionHandle); in onDrawFrame() 74 GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3); in onDrawFrame() 80 GLES20.glViewport(0, 0, width, height); in onSurfaceChanged() 88 mvPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition"); in onSurfaceCreated() 96 int shader = GLES20.glCreateShader(shaderType); in loadShader() [all …]
|
/frameworks/base/media/tests/MediaDump/src/com/android/mediadump/ |
D | VideoDumpView.java | 45 import android.opengl.GLES20; 88 public static final int PIXEL_FORMAT = GLES20.GL_RGB; 89 public static final int PIXEL_TYPE = PIXEL_FORMAT == GLES20.GL_RGBA 90 ? GLES20.GL_UNSIGNED_BYTE : GLES20.GL_UNSIGNED_SHORT_5_6_5; 92 PIXEL_FORMAT == GLES20.GL_RGBA ? 4 : 2; 94 = PIXEL_FORMAT == GLES20.GL_RGBA ? true : false; 387 GLES20.glClearColor(0.0f, 1.0f, 0.0f, 1.0f); in onDrawFrame() 388 GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 391 GLES20.glUseProgram(mProgram); in onDrawFrame() 395 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); in onDrawFrame() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/ |
D | GLES20Canvas.java | 21 import android.opengl.GLES20; 199 handle = GLES20.glGetUniformLocation(program, mName); in loadHandle() 211 handle = GLES20.glGetAttribLocation(program, mName); in loadHandle() 278 int drawVertexShader = loadShader(GLES20.GL_VERTEX_SHADER, DRAW_VERTEX_SHADER); in GLES20Canvas() 279 int textureVertexShader = loadShader(GLES20.GL_VERTEX_SHADER, TEXTURE_VERTEX_SHADER); in GLES20Canvas() 280 int meshVertexShader = loadShader(GLES20.GL_VERTEX_SHADER, MESH_VERTEX_SHADER); in GLES20Canvas() 281 int drawFragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, DRAW_FRAGMENT_SHADER); in GLES20Canvas() 282 int textureFragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, TEXTURE_FRAGMENT_SHADER); in GLES20Canvas() 283 int oesTextureFragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, in GLES20Canvas() 292 GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA); in GLES20Canvas() [all …]
|
D | GLES20IdImpl.java | 3 import android.opengl.GLES20; 13 GLES20.glGenTextures(1, mTempIntArray, 0); in generateTexture() 20 GLES20.glGenBuffers(n, buffers, offset); in glGenBuffers() 26 GLES20.glDeleteTextures(n, textures, offset); in glDeleteTextures() 33 GLES20.glDeleteBuffers(n, buffers, offset); in glDeleteBuffers() 39 GLES20.glDeleteFramebuffers(n, buffers, offset); in glDeleteFramebuffers()
|
/frameworks/native/opengl/tests/testLatency/src/com/android/testlatency/ |
D | TestLatencyView.java | 36 import android.opengl.GLES20; 94 GLES20.glClearColor(0.4f, 0.4f, 0.4f, 1.0f); in onDrawFrame() 95 GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 96 GLES20.glUseProgram(mProgram); in onDrawFrame() 114 GLES20.glEnableVertexAttribArray(mvPositionHandle); in onDrawFrame() 116 GLES20.glEnableVertexAttribArray(mvColorHandle); in onDrawFrame() 134 … GLES20.glVertexAttribPointer(mvPositionHandle, 2, GLES20.GL_FLOAT, false, 6*4, mTriangleVertices); in onDrawFrame() 137 … GLES20.glVertexAttribPointer(mvColorHandle, 4, GLES20.GL_FLOAT, false, 6*4, mTriangleVertices); in onDrawFrame() 139 GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3); in onDrawFrame() 145 GLES20.glViewport(0, 0, width, height); in onSurfaceChanged() [all …]
|
/frameworks/base/tests/UiBench/src/com/android/test/uibench/opengl/ |
D | ImageFlipRenderThread.java | 37 import static android.opengl.GLES20.GL_CLAMP_TO_EDGE; 38 import static android.opengl.GLES20.GL_COLOR_BUFFER_BIT; 39 import static android.opengl.GLES20.GL_COMPILE_STATUS; 40 import static android.opengl.GLES20.GL_FLOAT; 41 import static android.opengl.GLES20.GL_FRAGMENT_SHADER; 42 import static android.opengl.GLES20.GL_LINEAR; 43 import static android.opengl.GLES20.GL_LINK_STATUS; 44 import static android.opengl.GLES20.GL_NO_ERROR; 45 import static android.opengl.GLES20.GL_RGBA; 46 import static android.opengl.GLES20.GL_TEXTURE0; [all …]
|
/frameworks/base/core/java/android/hardware/camera2/legacy/ |
D | SurfaceTextureRenderer.java | 29 import android.opengl.GLES20; 203 int shader = GLES20.glCreateShader(shaderType); in loadShader() 205 GLES20.glShaderSource(shader, source); in loadShader() 206 GLES20.glCompileShader(shader); in loadShader() 208 GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); in loadShader() 211 Log.e(TAG, " " + GLES20.glGetShaderInfoLog(shader)); in loadShader() 212 GLES20.glDeleteShader(shader); in loadShader() 220 int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource); in createProgram() 224 int pixelShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource); in createProgram() 229 int program = GLES20.glCreateProgram(); in createProgram() [all …]
|
/frameworks/base/media/mca/effect/java/android/media/effect/ |
D | EffectContext.java | 23 import android.opengl.GLES20; 117 GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, mOldState, GL_STATE_FBO); in saveGLState() 118 GLES20.glGetIntegerv(GLES20.GL_CURRENT_PROGRAM, mOldState, GL_STATE_PROGRAM); in saveGLState() 119 GLES20.glGetIntegerv(GLES20.GL_ARRAY_BUFFER_BINDING, mOldState, GL_STATE_ARRAYBUFFER); in saveGLState() 123 GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mOldState[GL_STATE_FBO]); in restoreGLState() 124 GLES20.glUseProgram(mOldState[GL_STATE_PROGRAM]); in restoreGLState() 125 GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mOldState[GL_STATE_ARRAYBUFFER]); in restoreGLState()
|
/frameworks/base/docs/html/training/graphics/opengl/ |
D | draw.jd | 117 // create a vertex shader type (GLES20.GL_VERTEX_SHADER) 118 // or a fragment shader type (GLES20.GL_FRAGMENT_SHADER) 119 int shader = GLES20.glCreateShader(type); 122 GLES20.glShaderSource(shader, shaderCode); 123 GLES20.glCompileShader(shader); 147 int vertexShader = MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER, 149 int fragmentShader = MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER, 153 mProgram = GLES20.glCreateProgram(); 156 GLES20.glAttachShader(mProgram, vertexShader); 159 GLES20.glAttachShader(mProgram, fragmentShader); [all …]
|
D | projection.jd | 81 GLES20.glViewport(0, 0, width, height); 160 <strong>mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");</strong> 163 <strong>GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);</strong> 166 GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vertexCount); 169 GLES20.glDisableVertexAttribArray(mPositionHandle);
|
/frameworks/native/opengl/tests/testFramerate/src/com/android/testframerate/ |
D | TestFramerateView.java | 37 import android.opengl.GLES20; 79 GLES20.glClearColor(red, green, blue, 1.0f); in onDrawFrame() 80 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); in onDrawFrame() 84 GLES20.glViewport(0, 0, width, height); in onSurfaceChanged()
|
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videoproc/ |
D | BackDropperFilter.java | 29 import android.opengl.GLES20; 728 mVideoInput.setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() 729 GLES20.GL_LINEAR_MIPMAP_NEAREST); in process() 732 mBgInput.setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() 733 GLES20.GL_LINEAR_MIPMAP_NEAREST); in process() 744 mDistance.setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() 745 GLES20.GL_LINEAR_MIPMAP_NEAREST); in process() 749 mMask.setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() 750 GLES20.GL_LINEAR_MIPMAP_NEAREST); in process() 774 mMaskVerify[outputIndex].setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() [all …]
|
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/ |
D | DrawRectFilter.java | 31 import android.opengl.GLES20; 126 GLES20.glLineWidth(1.0f); in renderBox() 127 GLES20.glDrawArrays(GLES20.GL_LINE_LOOP, 0, 4); in renderBox()
|
D | ResizeFilter.java | 31 import android.opengl.GLES20; 103 mipmapped.setTextureParameter(GLES20.GL_TEXTURE_MIN_FILTER, in process() 104 GLES20.GL_LINEAR_MIPMAP_NEAREST); in process()
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/ |
D | ShaderProgram.java | 26 import android.opengl.GLES20; 91 GLES20.glFinish(); in process() 127 GLES20.glFinish(); in process()
|