Java Code Examples for android.opengl.GLES11#glVertexPointer()
The following examples show how to use
android.opengl.GLES11#glVertexPointer() .
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: Sphere.java From Alite with GNU General Public License v3.0 | 6 votes |
public void render() { if (hasNormals) { GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); } else { GLES11.glDisableClientState(GLES11.GL_NORMAL_ARRAY); } GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); if (textureFilename != null) { GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); } else { GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glDisable(GLES11.GL_LIGHTING); GLES11.glColor4f(r, g, b, a); } alite.getTextureManager().setTexture(textureFilename); GLES11.glDrawArrays(glDrawMode, 0, numberOfVertices); if (!hasNormals) { GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY); } if (textureFilename == null) { GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnable(GLES11.GL_LIGHTING); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); } }
Example 2
Source File: Skysphere.java From Alite with GNU General Public License v3.0 | 6 votes |
public void render() { GLES11.glDisableClientState(GLES11.GL_NORMAL_ARRAY); GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glDisable(GLES11.GL_CULL_FACE); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDisable(GLES11.GL_LIGHTING); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); alite.getTextureManager().setTexture(textureFilename); GLES11.glDrawArrays(glDrawMode, 0, numberOfVertices); GLES11.glEnable(GLES11.GL_LIGHTING); GLES11.glEnable(GLES11.GL_CULL_FACE); GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glDisableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glBindTexture(GLES11.GL_TEXTURE_2D, 0); }
Example 3
Source File: AndroidGraphics.java From Alite with GNU General Public License v3.0 | 6 votes |
@Override public void drawDashedCircle(int cx, int cy, int r, long color, int segments) { if (segments > 64) { segments = 64; } cx = transX(cx); cy = transY(cy); r = (int) (r * scaleFactor); circleBuffer.clear(); float step = 360.0f / segments; for (float i = 0; i < 360.0f; i += step) { float ang = (float) Math.toRadians(i); circleBuffer.put((float) (cx + Math.cos(ang) * r)); circleBuffer.put((float) (cy + Math.sin(ang) * r)); } circleBuffer.position(0); setGlColor(color); GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, circleBuffer); GLES11.glDrawArrays(GLES11.GL_LINES, 0, segments); }
Example 4
Source File: Disk.java From Alite with GNU General Public License v3.0 | 6 votes |
public void render() { GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); if (textureFilename != null) { GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); alite.getTextureManager().setTexture(textureFilename); } else { GLES11.glDisable(GLES11.GL_LIGHTING); GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); } GLES11.glDrawArrays(glDrawMode, 0, numberOfVertices); if (textureFilename == null) { GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnable(GLES11.GL_LIGHTING); } }
Example 5
Source File: TargetBox.java From Alite with GNU General Public License v3.0 | 6 votes |
public void render() { alite.getTextureManager().setTexture(null); GLES11.glDisable(GLES11.GL_CULL_FACE); GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, lineBuffer); GLES11.glColor4f(r, g, b, a); GLES11.glDisable(GLES11.GL_LIGHTING); GLES11.glLineWidth(5); GLES11.glDrawArrays(GLES11.GL_LINES, 0, 24); GLES11.glLineWidth(1); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glEnable(GLES11.GL_LIGHTING); GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnable(GLES11.GL_CULL_FACE); }
Example 6
Source File: AliteLogo.java From Alite with GNU General Public License v3.0 | 6 votes |
@Override public void render() { alite.getTextureManager().setTexture(textureFilename); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glEnable(GLES11.GL_BLEND); GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices); GLES11.glDisable(GLES11.GL_BLEND); alite.getTextureManager().setTexture(null); if (Settings.engineExhaust && exhaust != null && !exhaust.isEmpty() && getSpeed() < 0f) { for (EngineExhaust ex: exhaust) { ex.render(); } } }
Example 7
Source File: Cougar.java From Alite with GNU General Public License v3.0 | 6 votes |
@Override public void render() { alite.getTextureManager().setTexture(textureFilename); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices); wing.render(); wing.applyDeltaRotation(0, 0, 180); GLES11.glMultMatrixf(wing.getMatrix(), 0); wing.render(); wing.applyDeltaRotation(0, 0, 180); alite.getTextureManager().setTexture(null); if (Settings.engineExhaust && !exhaust.isEmpty()) { for (EngineExhaust ex: exhaust) { ex.render(); } } }
Example 8
Source File: AndroidPixmap.java From Alite with GNU General Public License v3.0 | 6 votes |
public void render() { GLES11.glEnable(GLES11.GL_TEXTURE_2D); if (!textureManager.checkTexture(fileName)) { textureManager.addTexture(fileName, bitmap); } GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glEnable(GLES11.GL_BLEND); GLES11.glBlendFunc(GLES11.GL_SRC_ALPHA, GLES11.GL_ONE_MINUS_SRC_ALPHA); textureManager.setTexture(fileName); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 4); GLES11.glDisable(GLES11.GL_BLEND); GLES11.glDisable(GLES11.GL_TEXTURE_2D); textureManager.setTexture(null); GLES11.glDisableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); }
Example 9
Source File: AndroidGraphics.java From Alite with GNU General Public License v3.0 | 6 votes |
@Override public void fillCircle(int cx, int cy, int r, long color, int segments) { if (segments > 64) { segments = 64; } cx = transX(cx); cy = transY(cy); r = (int) (r * scaleFactor); circleBuffer.clear(); float step = 360.0f / segments; for (float i = 0; i < 360.0f; i += step) { float ang = (float) Math.toRadians(i); circleBuffer.put((float) (cx + Math.cos(ang) * r)); circleBuffer.put((float) (cy + Math.sin(ang) * r)); } circleBuffer.position(0); setGlColor(color); GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, circleBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_FAN, 0, segments); }
Example 10
Source File: HyperspaceScreen.java From Alite with GNU General Public License v3.0 | 5 votes |
@Override public void performPresent(float deltaTime) { if (isDisposed) { return; } GLES11.glDisable(GLES11.GL_CULL_FACE); GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT | GLES11.GL_DEPTH_BUFFER_BIT); counter += 0.72f; if (counter > 360) { counter = 0; } switch (increase) { case 0: red += 0.002f; if (red > 1.0f) red = 1.0f; break; case 1: green += 0.002f; if (green > 1.0f) green = 1.0f; break; case 2: blue += 0.002f; if (blue > 1.0f) blue = 1.0f; break; } GLES11.glLoadIdentity(); lookAt(-3.5f, 0, 0, -3.5f, 1.0f, 0, (float) Math.sin(Math.toRadians(counter)), 0.0f, (float) Math.cos(Math.toRadians(counter))); GLES11.glRotatef(counter * 2, 0.0f, 0.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, textureBuffer); GLES11.glMatrixMode(GLES11.GL_TEXTURE); GLES11.glTranslatef(0.0f, -0.015f, 0.0f); GLES11.glMatrixMode(GLES11.GL_MODELVIEW); GLES11.glColor4f(red, green, blue, 1.0f); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, totalIndices); GLES11.glEnable(GLES11.GL_CULL_FACE); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); }
Example 11
Source File: Sprite.java From Alite with GNU General Public License v3.0 | 5 votes |
public void simpleRender() { GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); alite.getTextureManager().setTexture(textureFilename); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 4); }
Example 12
Source File: AndroidGraphics.java From Alite with GNU General Public License v3.0 | 5 votes |
@Override public void drawRect(int x, int y, int width, int height, long color) { int x2 = transX(x + width - 1); int ty2 = transY(y + height - 1); x = transX(x); y = transY(y); int ty = y < 0 ? 0 : y; if (ty2 < 0) { return; } GLES11.glLineWidth(5 * scaleFactor); setGlColor(color); rectBuffer.clear(); rectBuffer.put(x); rectBuffer.put(ty); rectBuffer.put(x2); rectBuffer.put(ty); rectBuffer.put(x2); rectBuffer.put(ty2); rectBuffer.put(x); rectBuffer.put(ty2); rectBuffer.position(0); GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, rectBuffer); GLES11.glDrawArrays(GLES11.GL_LINE_LOOP, 0, 4); GLES11.glLineWidth(1); }
Example 13
Source File: AutomaticLaunchScreen.java From Alite with GNU General Public License v3.0 | 5 votes |
@Override public void performPresent(float deltaTime) { if (isDisposed) { return; } GLES11.glDisable(GLES11.GL_CULL_FACE); GLES11.glClear(GLES11.GL_COLOR_BUFFER_BIT | GLES11.GL_DEPTH_BUFFER_BIT); counter += 0.72f; if (counter > 360) { counter = 0; } switch (increase) { case 0: red += 0.002f; if (red > 1.0f) red = 1.0f; break; case 1: green += 0.002f; if (green > 1.0f) green = 1.0f; break; case 2: blue += 0.002f; if (blue > 1.0f) blue = 1.0f; break; } GLES11.glLoadIdentity(); lookAt(-3.5f, 0, 0, -3.5f, 1.0f, 0, (float) Math.sin(Math.toRadians(counter)), 0.0f, (float) Math.cos(Math.toRadians(counter))); GLES11.glRotatef(counter * 2, 0.0f, 0.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, textureBuffer); GLES11.glMatrixMode(GLES11.GL_TEXTURE); GLES11.glTranslatef(0.0f, -0.015f, 0.0f); GLES11.glMatrixMode(GLES11.GL_MODELVIEW); GLES11.glColor4f(red, green, blue, 1.0f); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, totalIndices); GLES11.glEnable(GLES11.GL_CULL_FACE); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); }
Example 14
Source File: SpaceObject.java From Alite with GNU General Public License v3.0 | 5 votes |
@Override public void render() { alite.getTextureManager().setTexture(textureFilename); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices); alite.getTextureManager().setTexture(null); if (Settings.engineExhaust && exhaust != null && !exhaust.isEmpty() && getSpeed() < 0f) { for (EngineExhaust ex: exhaust) { ex.render(); } } }
Example 15
Source File: DockingBay.java From Alite with GNU General Public License v3.0 | 5 votes |
void render() { boolean enabled = GLES11.glIsEnabled(GLES11.GL_CULL_FACE); if (enabled) { GLES11.glDisable(GLES11.GL_CULL_FACE); } alite.getTextureManager().setTexture(textureFilename); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, numberOfVertices); if (enabled) { GLES11.glEnable(GLES11.GL_CULL_FACE); } }
Example 16
Source File: Box.java From Alite with GNU General Public License v3.0 | 5 votes |
public void render() { alite.getTextureManager().setTexture(null); GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glColor4f(r, g, b, a); GLES11.glDisable(GLES11.GL_LIGHTING); GLES11.glDrawArrays(GLES11.GL_TRIANGLES, 0, 36); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GLES11.glEnable(GLES11.GL_LIGHTING); GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); }
Example 17
Source File: Vertices.java From Alite with GNU General Public License v3.0 | 4 votes |
public void drawFull(int primitiveType, int offset, int numVertices) { GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); // Enable Position // in Vertices vertices.position(0); // Set Vertex Buffer to Position GLES11.glVertexPointer(positionCnt, GLES11.GL_FLOAT, vertexSize, vertices); // Set Vertex Pointer if (hasColor) { // IF Vertices Have Color GLES11.glEnableClientState(GLES11.GL_COLOR_ARRAY); // Enable Color // in Vertices vertices.position(positionCnt); // Set Vertex Buffer to Color GLES11.glColorPointer(COLOR_CNT, GLES11.GL_FLOAT, vertexSize, vertices); // Set Color Pointer } if (hasTexCoords) { // IF Vertices Have Texture Coords GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); // Enable // Texture // Coords // in // Vertices vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0)); // Set // Vertex // Buffer // to // Texture // Coords // (NOTE: // position // based // on // whether // color // is // also // specified) GLES11.glTexCoordPointer(TEXCOORD_CNT, GLES11.GL_FLOAT, vertexSize, vertices); // Set Texture Coords Pointer } if (indices != null) { // IF Indices Exist indices.position(offset); // Set Index Buffer to Specified Offset GLES11.glDrawElements(primitiveType, numVertices, GLES11.GL_UNSIGNED_SHORT, indices); // Draw Indexed } else { // ELSE No Indices Exist GLES11.glDrawArrays(primitiveType, offset, numVertices); // Draw // Direct // (Array) } if (hasTexCoords) // IF Vertices Have Texture Coords GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); // Clear // Texture // Coords // State if (hasColor) // IF Vertices Have Color GLES11.glDisableClientState(GLES11.GL_COLOR_ARRAY); // Clear Color // State GLES11.glDisableClientState(GLES11.GL_VERTEX_ARRAY); // Clear Vertex // Array State }
Example 18
Source File: Vertices.java From Alite with GNU General Public License v3.0 | 4 votes |
public void bind() { GLES11.glEnableClientState(GLES11.GL_VERTEX_ARRAY); // Enable Position // in Vertices vertices.position(0); // Set Vertex Buffer to Position GLES11.glVertexPointer(positionCnt, GLES11.GL_FLOAT, vertexSize, vertices); // Set Vertex Pointer if (hasColor) { // IF Vertices Have Color GLES11.glEnableClientState(GLES11.GL_COLOR_ARRAY); // Enable Color // in Vertices vertices.position(positionCnt); // Set Vertex Buffer to Color GLES11.glColorPointer(COLOR_CNT, GLES11.GL_FLOAT, vertexSize, vertices); // Set Color Pointer } if (hasTexCoords) { // IF Vertices Have Texture Coords GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); // Enable // Texture // Coords // in // Vertices vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0)); // Set // Vertex // Buffer // to // Texture // Coords // (NOTE: // position // based // on // whether // color // is // also // specified) GLES11.glTexCoordPointer(TEXCOORD_CNT, GLES11.GL_FLOAT, vertexSize, vertices); // Set Texture Coords Pointer } if (hasNormals) { GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY); // Enable // Normals in // Vertices vertices.position(positionCnt + (hasColor ? COLOR_CNT : 0) + (hasTexCoords ? TEXCOORD_CNT : 0)); // Set Vertex Buffer // to Normals (NOTE: // position based on // whether // color/texcoords // is also // specified) GLES11.glNormalPointer(GLES11.GL_FLOAT, vertexSize, vertices); // Set // Normals // Pointer } }
Example 19
Source File: LaserCylinder.java From Alite with GNU General Public License v3.0 | 4 votes |
public void render(Alite alite) { if (!visible) { return; } GLES11.glDepthFunc(GLES11.GL_LEQUAL); GLES11.glDepthMask(false); GLES11.glDisable(GLES11.GL_CULL_FACE); if (textureFilename != null) { GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glEnable(GLES11.GL_LIGHTING); alite.getTextureManager().setTexture(textureFilename); } else { GLES11.glDisableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); GLES11.glDisable(GLES11.GL_LIGHTING); alite.getTextureManager().setTexture(null); } GLES11.glEnableClientState(GLES11.GL_NORMAL_ARRAY); GLES11.glEnable(GLES11.GL_BLEND); GLES11.glBlendFunc(GLES11.GL_ONE, GLES11.GL_ONE); GLES11.glColor4f(emission[0], emission[1], emission[2], emission[3]); for (int i = 0; i < 2; i++) { GLES11.glPushMatrix(); GLES11.glMultMatrixf(getMatrix(), 0); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, diskBuffer1); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer[0]); if (textureFilename != null) { GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer[0]); } GLES11.glDrawArrays(GLES11.GL_TRIANGLE_FAN, 0, 10); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, cylinderBuffer); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer[1]); if (textureFilename != null) { GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer[1]); } GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 18); GLES11.glVertexPointer(3, GLES11.GL_FLOAT, 0, diskBuffer2); GLES11.glNormalPointer(GLES11.GL_FLOAT, 0, normalBuffer[2]); if (textureFilename != null) { GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer[2]); } GLES11.glDrawArrays(GLES11.GL_TRIANGLE_FAN, 0, 10); GLES11.glPopMatrix(); MathHelper.copyMatrix(getMatrix(), saveMatrix); scale(0.7f, 0.7f, 0.7f); GLES11.glColor4f(1.0f, 1.0f, 1.0f, 0.8f); } MathHelper.copyMatrix(saveMatrix, currentMatrix); extractVectors(); GLES11.glEnable(GLES11.GL_CULL_FACE); GLES11.glEnable(GLES11.GL_LIGHTING); GLES11.glEnableClientState(GLES11.GL_TEXTURE_COORD_ARRAY); alite.getTextureManager().setTexture(null); GLES11.glDepthFunc(GLES11.GL_LESS); GLES11.glDepthMask(true); GLES11.glDisable(GLES11.GL_BLEND); }
Example 20
Source File: Sprite.java From Alite with GNU General Public License v3.0 | 4 votes |
public void justRender() { GLES11.glVertexPointer(2, GLES11.GL_FLOAT, 0, vertexBuffer); GLES11.glTexCoordPointer(2, GLES11.GL_FLOAT, 0, texCoordBuffer); GLES11.glDrawArrays(GLES11.GL_TRIANGLE_STRIP, 0, 4); }