Code example for GL11

Methods: glBindTexture, glEnable, glGenTextures, glGetError, glTexEnvf, glTexParameterf, glTexParameteri

0
			return false; 
		} 
 
		int glError = GL11.GL_NO_ERROR;
	 
		gl.glEnable(GL11.GL_TEXTURE_2D);
		// Upload the bitmap to a new texture. 
		gl.glGenTextures(1, mTextureId, 0);
//		Log.i(mName, "Texture "+ mTextureId[0]); 
 
				 
		gl.glBindTexture(GL11.GL_TEXTURE_2D, mTextureId[0]);
		gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP_TO_EDGE);
		gl.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP_TO_EDGE);
		gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
		gl.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
		gl.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE,GL11.GL_REPLACE);
		GLUtils.texImage2D(GL11.GL_TEXTURE_2D, 0, bitmap, 0);
		Log.i(mName, "Texture creation bitmap.getWidth " + bitmap.getWidth());
		Log.i(mName, "Texture creation bitmap.getHeight " + bitmap.getHeight());		
		glError = gl.glGetError();
			//bitmap.recycle();		 
				 
		if (glError != GL11.GL_NO_ERROR) {
					// There was an error, we need to retry this texture at some 
					// later time