Home
last modified time | relevance | path

Searched refs:GLES20 (Results 1 – 25 of 45) sorted by relevance

12

/frameworks/rs/tests/java_api/GenImages/src/com/android/rs/genimage/
DGenImage.java34 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()
157GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST); in setup()
160GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); in setup()
167GLES20.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/
DGLToolbox.java20 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 …]
DImageShader.java20 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 …]
DTextureSource.java21 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 …]
DRenderTarget.java22 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/
DGLDepthTestActivity.java27 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/
DMyGLSurfaceView.java32 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/
DColorFade.java29 import android.opengl.GLES20;
212 int shader = GLES20.glCreateShader(type); in loadShader()
214 GLES20.glShaderSource(shader, source); in loadShader()
215 GLES20.glCompileShader(shader); in loadShader()
218 GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); in loadShader()
221 Slog.e(TAG, GLES20.glGetShaderSource(shader)); in loadShader()
222 Slog.e(TAG, GLES20.glGetShaderInfoLog(shader)); in loadShader()
223 GLES20.glDeleteShader(shader); in loadShader()
232 GLES20.GL_VERTEX_SHADER); in initGLShaders()
234 GLES20.GL_FRAGMENT_SHADER); in initGLShaders()
[all …]
/frameworks/native/opengl/tests/gl2_java/src/com/android/gl2java/
DGL2JavaView.java36 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()
70GLES20.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/
DGL2CameraEye.java34 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/
DVideoDumpView.java45 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/
DTestLatencyView.java36 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()
134GLES20.glVertexAttribPointer(mvPositionHandle, 2, GLES20.GL_FLOAT, false, 6*4, mTriangleVertices); in onDrawFrame()
137GLES20.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/
DGLES20Canvas.java21 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 …]
DGLES20IdImpl.java3 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/tests/UiBench/src/com/android/test/uibench/opengl/
DImageFlipRenderThread.java37 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/
DSurfaceTextureRenderer.java29 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/
DEffectContext.java23 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/rs/tests/java_api/RsNbody/src/com/example/android/rs/nbody_gl/
DBasicGLRenderer.java7 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()
DSwarm.java5 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/base/packages/SystemUI/src/com/android/systemui/glwallpaper/
DImageGLProgram.java19 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 …]
DImageGLWallpaper.java19 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 …]
/frameworks/native/opengl/tests/testFramerate/src/com/android/testframerate/
DTestFramerateView.java37 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/tests/GamePerformance/src/android/gameperformance/
DCustomOpenGLView.java26 import android.opengl.GLES20;
44 GLES20.glClearColor(1.0f, 0.0f, 0.0f, 1.0f); in CustomOpenGLView()
54 GLES20.glViewport(0, 0, width, height); in CustomOpenGLView()
59 GLES20.glClearColor( in CustomOpenGLView()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/videoproc/
DBackDropperFilter.java29 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/
DDrawRectFilter.java31 import android.opengl.GLES20;
126 GLES20.glLineWidth(1.0f); in renderBox()
127 GLES20.glDrawArrays(GLES20.GL_LINE_LOOP, 0, 4); in renderBox()

12