Code example for GL10

Methods: glBindTexture, glGenTextures, glTexParameterf

0
		 
			/*Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), 
					R.drawable.android);*/ 
	 
			// generate one texture pointer 
			gl.glGenTextures(1, textures, 0);
			// ...and bind it to our array 
			gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
			 
			// create nearest filtered texture 
			gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
			gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
			 
			gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE);
			gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE);
			 
			// Generate mipmap??? 
			Utils.generateMipmapsForBoundTexture(bitmap);
	 
			//Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE 
	//		gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_REPEAT);