/frameworks/rs/tests/java_api/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 …]
|
/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 …]
|
/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/tests/GamePerformance/src/android/gameperformance/ |
D | OpenGLUtils.java | 21 import android.opengl.GLES20; 32 final int error = GLES20.glGetError(); in checkGlError() 33 if (error == GLES20.GL_NO_ERROR) { in checkGlError() 41 final int shader = GLES20.glCreateShader(type); in loadShader() 44 GLES20.glShaderSource(shader, shaderCode); in loadShader() 46 GLES20.glCompileShader(shader); in loadShader() 54 final int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode); in createProgram() 55 final int fragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode); in createProgram() 57 final int program = GLES20.glCreateProgram(); in createProgram() 59 GLES20.glAttachShader(program, vertexShader); in createProgram() [all …]
|
D | RenderPatchOpenGLTest.java | 24 import android.opengl.GLES20; 80 GLES20.glUseProgram(mProgram); in ensureInited() 84 mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix"); in ensureInited() 87 mTextureHandle = GLES20.glGetUniformLocation(mProgram, "uTexture"); in ensureInited() 90 mPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition"); in ensureInited() 92 mTextureCoordHandle = GLES20.glGetAttribLocation(mProgram, "vTexture"); in ensureInited() 94 mColorHandle = GLES20.glGetUniformLocation(mProgram, "uColor"); in ensureInited() 125 GLES20.glUseProgram(mProgram); in draw() 128 GLES20.glDisable(GLES20.GL_BLEND); in draw() 131 GLES20.glEnableVertexAttribArray(mPositionHandle); in draw() [all …]
|
D | FillRateOpenGLTest.java | 24 import android.opengl.GLES20; 88 GLES20.glEnable(GLES20.GL_BLEND); in onBeforeDraw() 90 GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA); in onBeforeDraw()
|
D | CustomOpenGLView.java | 27 import android.opengl.GLES20; 58 GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); in CustomOpenGLView() 74 GLES20.glViewport(0, 0, width, height); in CustomOpenGLView() 80 GLES20.glClearColor(0.25f, 0.25f, 0.25f, 1.0f); in CustomOpenGLView()
|
/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/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/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/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/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/base/services/core/java/com/android/server/display/ |
D | ColorFade.java | 33 import android.opengl.GLES20; 249 int shader = GLES20.glCreateShader(type); in loadShader() 251 GLES20.glShaderSource(shader, source); in loadShader() 252 GLES20.glCompileShader(shader); in loadShader() 255 GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); in loadShader() 258 Slog.e(TAG, GLES20.glGetShaderSource(shader)); in loadShader() 259 Slog.e(TAG, GLES20.glGetShaderInfoLog(shader)); in loadShader() 260 GLES20.glDeleteShader(shader); in loadShader() 269 GLES20.GL_VERTEX_SHADER); in initGLShaders() 271 GLES20.GL_FRAGMENT_SHADER); in initGLShaders() [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/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/packages/SystemUI/src/com/android/systemui/glwallpaper/ |
D | ImageGLWallpaper.java | 19 import static android.opengl.GLES20.GL_FLOAT; 20 import static android.opengl.GLES20.GL_LINEAR; 21 import static android.opengl.GLES20.GL_TEXTURE0; 22 import static android.opengl.GLES20.GL_TEXTURE_2D; 23 import static android.opengl.GLES20.GL_TEXTURE_MAG_FILTER; 24 import static android.opengl.GLES20.GL_TEXTURE_MIN_FILTER; 25 import static android.opengl.GLES20.GL_TRIANGLES; 26 import static android.opengl.GLES20.glActiveTexture; 27 import static android.opengl.GLES20.glBindTexture; 28 import static android.opengl.GLES20.glDrawArrays; [all …]
|
D | ImageGLProgram.java | 19 import static android.opengl.GLES20.GL_FRAGMENT_SHADER; 20 import static android.opengl.GLES20.GL_VERTEX_SHADER; 21 import static android.opengl.GLES20.glAttachShader; 22 import static android.opengl.GLES20.glCompileShader; 23 import static android.opengl.GLES20.glCreateProgram; 24 import static android.opengl.GLES20.glCreateShader; 25 import static android.opengl.GLES20.glGetAttribLocation; 26 import static android.opengl.GLES20.glGetUniformLocation; 27 import static android.opengl.GLES20.glLinkProgram; 28 import static android.opengl.GLES20.glShaderSource; [all …]
|
/frameworks/rs/tests/java_api/RsNbody/src/com/example/android/rs/nbody_gl/ |
D | BasicGLRenderer.java | 7 import android.opengl.GLES20; 34 GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); in onSurfaceCreated() 35 GLES20.glEnable(GLES20.GL_DEPTH_TEST); in onSurfaceCreated() 49 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); in onDrawFrame() 65 GLES20.glViewport(0, 0, width, height); in onSurfaceChanged() 71 int shader = GLES20.glCreateShader(type); in loadShader() 72 GLES20.glShaderSource(shader, shaderCode); in loadShader() 73 GLES20.glCompileShader(shader); in loadShader() 80 while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { in checkGlError()
|
D | Swarm.java | 5 import android.opengl.GLES20; 139 int vertexShader = BasicGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode); in Swarm() 140 … int fragmentShader = BasicGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode); in Swarm() 142 mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program in Swarm() 143 GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program in Swarm() 144 GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program in Swarm() 145 GLES20.glLinkProgram(mProgram); // create OpenGL program executables in Swarm() 161 GLES20.glUseProgram(mProgram); in draw() 163 mPositionHandle = GLES20.glGetAttribLocation(mProgram, "a_Position"); in draw() 164 GLES20.glEnableVertexAttribArray(mPositionHandle); in draw() [all …]
|
/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 …]
|