Code example for GL10

Methods: glClearColor, glClearDepthf, glEnable, glGenTextures

0
	/* (non-Javadoc) 
	 * @see android.opengl.GLSurfaceView.Renderer#onSurfaceCreated(javax.microedition.khronos.opengles.GL10, javax.microedition.khronos.egl.EGLConfig) 
	 */ 
	@Override 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
		gl.glClearColor(0,0,0,0);
		gl.glClearDepthf(1.0f);
		//enable textures: 
		gl.glEnable(GL10.GL_TEXTURE_2D);
		 
		int[] textureNames = new int[1];
		//generate texture names: 
		gl.glGenTextures(1, textureNames, 0);
		textureName = textureNames[0];
		 
		textureBuffer = makeFloatBuffer(textureCoords);
 
		 
		//register unchaught exception handler 
		Thread.currentThread().setUncaughtExceptionHandler(activity);
		 
		markerInfo.initGL(gl);
		if(customRenderer != null)
			customRenderer.initGL(gl);
	} 
	 
	/** 
	 * Make a direct NIO FloatBuffer from an array of floats 
	 * @param arr The array