Home
last modified time | relevance | path

Searched refs:gl (Results 1 – 25 of 28) sorted by relevance

12

/development/samples/ApiDemos/src/com/example/android/apis/graphics/
DFrameBufferObjectActivity.java60 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
61 checkGLError(gl); in onDrawFrame()
63 GL11ExtensionPack gl11ep = (GL11ExtensionPack) gl; in onDrawFrame()
65 drawOffscreenImage(gl, mSurfaceWidth, mSurfaceHeight); in onDrawFrame()
68 drawOffscreenImage(gl, mFramebufferWidth, mFramebufferHeight); in onDrawFrame()
70 drawOnscreen(gl, mSurfaceWidth, mSurfaceHeight); in onDrawFrame()
75 gl.glClearColor(1,0,0,0); in onDrawFrame()
76 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
80 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument
81 checkGLError(gl); in onSurfaceChanged()
[all …]
DCubeMapActivity.java57 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
58 checkGLError(gl); in onDrawFrame()
60 gl.glClearColor(0,0,1,0); in onDrawFrame()
64 gl.glClearColor(1,0,0,0); in onDrawFrame()
66 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
67 gl.glEnable(GL10.GL_DEPTH_TEST); in onDrawFrame()
68 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
69 gl.glLoadIdentity(); in onDrawFrame()
71 GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f); in onDrawFrame()
72 gl.glRotatef(mAngle, 0, 1, 0); in onDrawFrame()
[all …]
DCubeRenderer.java34 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
41 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
47 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
48 gl.glLoadIdentity(); in onDrawFrame()
49 gl.glTranslatef(0, 0, -3.0f); in onDrawFrame()
50 gl.glRotatef(mAngle, 0, 1, 0); in onDrawFrame()
51 gl.glRotatef(mAngle*0.25f, 1, 0, 0); in onDrawFrame()
53 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in onDrawFrame()
54 gl.glEnableClientState(GL10.GL_COLOR_ARRAY); in onDrawFrame()
56 mCube.draw(gl); in onDrawFrame()
[all …]
DTriangleRenderer.java46 public void onSurfaceCreated(GL10 gl, EGLConfig config) { in onSurfaceCreated() argument
52 gl.glDisable(GL10.GL_DITHER); in onSurfaceCreated()
58 gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, in onSurfaceCreated()
61 gl.glClearColor(.5f, .5f, .5f, 1); in onSurfaceCreated()
62 gl.glShadeModel(GL10.GL_SMOOTH); in onSurfaceCreated()
63 gl.glEnable(GL10.GL_DEPTH_TEST); in onSurfaceCreated()
64 gl.glEnable(GL10.GL_TEXTURE_2D); in onSurfaceCreated()
72 gl.glGenTextures(1, textures, 0); in onSurfaceCreated()
75 gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); in onSurfaceCreated()
77 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, in onSurfaceCreated()
[all …]
DMatrixPaletteRenderer.java181 public void createBufferObjects(GL gl) { in createBufferObjects() argument
184 GL11 gl11 = (GL11) gl; in createBufferObjects()
204 public void draw(GL10 gl) { in draw() argument
205 GL11 gl11 = (GL11) gl; in draw()
206 GL11Ext gl11Ext = (GL11Ext) gl; in draw()
208 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in draw()
214 gl.glEnableClientState(GL11Ext.GL_MATRIX_INDEX_ARRAY_OES); in draw()
215 gl.glEnableClientState(GL11Ext.GL_WEIGHT_ARRAY_OES); in draw()
222 gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); in draw()
223 gl.glDisableClientState(GL11Ext.GL_MATRIX_INDEX_ARRAY_OES); in draw()
[all …]
DTouchRotateActivity.java145 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
152 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
158 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
159 gl.glLoadIdentity(); in onDrawFrame()
160 gl.glTranslatef(0, 0, -3.0f); in onDrawFrame()
161 gl.glRotatef(mAngleX, 0, 1, 0); in onDrawFrame()
162 gl.glRotatef(mAngleY, 1, 0, 0); in onDrawFrame()
164 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in onDrawFrame()
165 gl.glEnableClientState(GL10.GL_COLOR_ARRAY); in onDrawFrame()
167 mCube.draw(gl); in onDrawFrame()
[all …]
DStaticTriangleRenderer.java57 void load(GL10 gl); in load() argument
74 public void onSurfaceCreated(GL10 gl, EGLConfig config) { in onSurfaceCreated() argument
118 mTextureLoader.load(gl); in onSurfaceCreated()
121 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
147 GLU.gluLookAt(gl, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f); in onDrawFrame()
164 mTriangle.draw(gl); in onDrawFrame()
167 public void onSurfaceChanged(GL10 gl, int w, int h) { in onSurfaceChanged() argument
188 public void load(GL10 gl) { in load() argument
259 public void draw(GL10 gl) { in draw() argument
DCube.java89 public void draw(GL10 gl) in draw() argument
91 gl.glFrontFace(GL10.GL_CW); in draw()
92 gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer); in draw()
93 gl.glColorPointer(4, GL10.GL_FIXED, 0, mColorBuffer); in draw()
94 gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, mIndexBuffer); in draw()
DCompressedTextureActivity.java90 public void load(GL10 gl) { in load() argument
112 public void load(GL10 gl) { in load() argument
/development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/
DSpriteTextRenderer.java53 public void onSurfaceCreated(GL10 gl, EGLConfig config) { in onSurfaceCreated() argument
59 gl.glDisable(GL10.GL_DITHER); in onSurfaceCreated()
65 gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, in onSurfaceCreated()
68 gl.glClearColor(.5f, .5f, .5f, 1); in onSurfaceCreated()
69 gl.glShadeModel(GL10.GL_SMOOTH); in onSurfaceCreated()
70 gl.glEnable(GL10.GL_DEPTH_TEST); in onSurfaceCreated()
71 gl.glEnable(GL10.GL_TEXTURE_2D); in onSurfaceCreated()
79 gl.glGenTextures(1, textures, 0); in onSurfaceCreated()
82 gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); in onSurfaceCreated()
84 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, in onSurfaceCreated()
[all …]
DLabelMaker.java80 public void initialize(GL10 gl) { in initialize() argument
83 gl.glGenTextures(1, textures, 0); in initialize()
85 gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureID); in initialize()
88 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, in initialize()
90 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, in initialize()
93 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, in initialize()
95 gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, in initialize()
98 gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, in initialize()
105 public void shutdown(GL10 gl) { in shutdown() argument
106 if ( gl != null) { in shutdown()
[all …]
DMatrixGrabber.java32 public void getCurrentState(GL10 gl) { in getCurrentState() argument
33 getCurrentProjection(gl); in getCurrentState()
34 getCurrentModelView(gl); in getCurrentState()
42 public void getCurrentModelView(GL10 gl) { in getCurrentModelView() argument
43 getMatrix(gl, GL10.GL_MODELVIEW, mModelView); in getCurrentModelView()
51 public void getCurrentProjection(GL10 gl) { in getCurrentProjection() argument
52 getMatrix(gl, GL10.GL_PROJECTION, mProjection); in getCurrentProjection()
55 private void getMatrix(GL10 gl, int mode, float[] mat) { in getMatrix() argument
56 MatrixTrackingGL gl2 = (MatrixTrackingGL) gl; in getMatrix()
DNumericSprite.java29 public void initialize(GL10 gl, Paint paint) { in initialize() argument
34 mLabelMaker.initialize(gl); in initialize()
35 mLabelMaker.beginAdding(gl); in initialize()
38 mLabelId[i] = mLabelMaker.add(gl, digit, paint); in initialize()
41 mLabelMaker.endAdding(gl); in initialize()
44 public void shutdown(GL10 gl) { in shutdown() argument
45 mLabelMaker.shutdown(gl); in shutdown()
67 public void draw(GL10 gl, float x, float y, in draw() argument
70 mLabelMaker.beginDrawing(gl, viewWidth, viewHeight); in draw()
74 mLabelMaker.draw(gl, x, y, mLabelId[digit]); in draw()
[all …]
DGrid.java115 public void draw(GL10 gl, boolean useTexture) { in draw() argument
116 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in draw()
117 gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer); in draw()
120 gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); in draw()
121 gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, mTexCoordBuffer); in draw()
122 gl.glEnable(GL10.GL_TEXTURE_2D); in draw()
124 gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY); in draw()
125 gl.glDisable(GL10.GL_TEXTURE_2D); in draw()
128 gl.glDrawElements(GL10.GL_TRIANGLES, mIndexCount, in draw()
130 gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); in draw()
DProjector.java61 public void getCurrentProjection(GL10 gl) { in getCurrentProjection() argument
62 mGrabber.getCurrentProjection(gl); in getCurrentProjection()
71 public void getCurrentModelView(GL10 gl) { in getCurrentModelView() argument
72 mGrabber.getCurrentModelView(gl); in getCurrentModelView()
DSpriteTextActivity.java32 public GL wrap(GL gl) { in onCreate()
33 return new MatrixTrackingGL(gl); in onCreate()
/development/samples/ApiDemos/src/com/example/android/apis/graphics/kube/
DKubeRenderer.java39 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
52 gl.glClearColor(0.5f,0.5f,0.5f,1); in onDrawFrame()
53 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
59 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
60 gl.glLoadIdentity(); in onDrawFrame()
61 gl.glTranslatef(0, 0, -3.0f); in onDrawFrame()
62 gl.glScalef(0.5f, 0.5f, 0.5f); in onDrawFrame()
63 gl.glRotatef(mAngle, 0, 1, 0); in onDrawFrame()
64 gl.glRotatef(mAngle*0.25f, 1, 0, 0); in onDrawFrame()
66 gl.glColor4f(0.7f, 0.7f, 0.7f, 1.0f); in onDrawFrame()
[all …]
DGLWorld.java72 public void draw(GL10 gl) in draw() argument
78 gl.glFrontFace(GL10.GL_CW); in draw()
79 gl.glShadeModel(GL10.GL_FLAT); in draw()
80 gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer); in draw()
81 gl.glColorPointer(4, GL10.GL_FIXED, 0, mColorBuffer); in draw()
82 gl.glDrawElements(GL10.GL_TRIANGLES, mIndexCount, GL10.GL_UNSIGNED_SHORT, mIndexBuffer); in draw()
/development/apps/OBJViewer/com/android/objviewer/
DOBJViewer.java144 private void init(GL10 gl) { in init() argument
149 gl.glEnable(gl.GL_DEPTH_TEST); in init()
151 gl.glDisable(gl.GL_SCISSOR_TEST); in init()
154 gl.glEnable(gl.GL_DITHER); in init()
156 gl.glShadeModel(gl.GL_SMOOTH); in init()
158 gl.glEnable(gl.GL_CULL_FACE); in init()
159 gl.glFrontFace(gl.GL_CCW); in init()
161 gl.glClearColor(0, 0, 0, 1); in init()
163 gl.glLightModelf(gl.GL_LIGHT_MODEL_TWO_SIDE, 0); in init()
164 gl.glLightModelfv(gl.GL_LIGHT_MODEL_AMBIENT, lightModelAmbient, 0); in init()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/os/
DRotationVectorDemo.java122 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
124 gl.glClear(GL10.GL_COLOR_BUFFER_BIT); in onDrawFrame()
127 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
128 gl.glLoadIdentity(); in onDrawFrame()
129 gl.glTranslatef(0, 0, -3.0f); in onDrawFrame()
130 gl.glMultMatrixf(mRotationMatrix, 0); in onDrawFrame()
133 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in onDrawFrame()
134 gl.glEnableClientState(GL10.GL_COLOR_ARRAY); in onDrawFrame()
136 mCube.draw(gl); in onDrawFrame()
139 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument
[all …]
/development/samples/OpenGL/HelloOpenGLES10/src/com/example/android/opengl/
DMyGLRenderer.java40 public void onSurfaceCreated(GL10 gl, EGLConfig config) { in onSurfaceCreated() argument
42 gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); in onSurfaceCreated()
49 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
52 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
55 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
56 gl.glLoadIdentity(); // reset the matrix to its default state in onDrawFrame()
59 GLU.gluLookAt(gl, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f); in onDrawFrame()
62 mSquare.draw(gl); in onDrawFrame()
71 gl.glRotatef(mAngle, 0.0f, 0.0f, 1.0f); in onDrawFrame()
74 mTriangle.draw(gl); in onDrawFrame()
[all …]
DTriangle.java66 public void draw(GL10 gl) { in draw() argument
68 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in draw()
71 gl.glColor4f( // set color: in draw()
74 gl.glVertexPointer( // point to vertex data: in draw()
77 gl.glDrawArrays( // draw shape: in draw()
83 gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); in draw()
DSquare.java73 public void draw(GL10 gl) { in draw() argument
75 gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); in draw()
78 gl.glColor4f( // set color in draw()
81 gl.glVertexPointer( // point to vertex data: in draw()
84 gl.glDrawElements( // draw shape: in draw()
91 gl.glDisableClientState(GL10.GL_VERTEX_ARRAY); in draw()
/development/samples/Compass/src/com/example/android/compass/
DCompassActivity.java92 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
99 gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); in onDrawFrame()
105 gl.glMatrixMode(GL10.GL_MODELVIEW); in onDrawFrame()
106 gl.glLoadIdentity(); in onDrawFrame()
107 gl.glTranslatef(0, 0, -2); in onDrawFrame()
117 gl.glMultMatrixf(mR, 0); in onDrawFrame()
121 gl.glVertexPointer(3, GL_FLOAT, 0, mVertexBuffer); in onDrawFrame()
122 gl.glColorPointer(4, GL_FLOAT, 0, mColorBuffer); in onDrawFrame()
123 gl.glDrawElements(GL_LINES, 6, GL_UNSIGNED_BYTE, mIndexBuffer); in onDrawFrame()
126 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument
[all …]
/development/samples/HelloEffects/src/com/example/android/mediafx/
DHelloEffects.java256 public void onDrawFrame(GL10 gl) { in onDrawFrame() argument
273 public void onSurfaceChanged(GL10 gl, int width, int height) { in onSurfaceChanged() argument
280 public void onSurfaceCreated(GL10 gl, EGLConfig config) { in onSurfaceCreated() argument

12