// Path: src/com/android/panoramagl/iphone/enumeration/EAGLRenderingAPI.java
// public enum EAGLRenderingAPI
// {
// 	kEAGLRenderingAPIOpenGLES1 (1),
// 	kEAGLRenderingAPIOpenGLES2 (2);
// 	
// 	private int oriented;
//     
// 	EAGLRenderingAPI(int value)
// 	{
//     	oriented = value;
//     }
//     
//     public int Ordinal()
//     {
// 		return oriented;
//     }
// }


import android.util.Log;
import android.view.SurfaceView;
import com.android.panoramagl.iphone.enumeration.EAGLRenderingAPI;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL10;
/*
 * This file is part of the PanoramaGL library for Android.
 *
 *  Authors: Javier Baez <javbaezga@gmail.com> and Miguel auay <mg_naunay@hotmail.com>
 *
 *  $Id$
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of
 * the License
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package com.android.panoramagl.iphone;




public class EAGLContext
{	
	private EGLContext context;
	private EGLConfig[] configs;
	private EGLDisplay display;
	private EGLSurface surface;
	
	public EGLConfig[] getConfigs()
	{
		return configs;
	}
	
	public EGLDisplay getDisplay()
	{
		return display;
	}
	
	public EGLContext getContext()
	{
		return context;
	}
	
	void setSurface(EGLSurface surface)
	{
		this.surface = surface;
	}
	
	public EGLSurface getSurface()
	{
		return this.surface;
	}
		
	public EAGLContext(EAGLRenderingAPI api) throws Exception
	{
		 this.api = api;
		 
// Path: src/com/android/panoramagl/iphone/enumeration/EAGLRenderingAPI.java
// public enum EAGLRenderingAPI
// {
// 	kEAGLRenderingAPIOpenGLES1 (1),
// 	kEAGLRenderingAPIOpenGLES2 (2);
// 	
// 	private int oriented;
//     
// 	EAGLRenderingAPI(int value)
// 	{
//     	oriented = value;
//     }
//     
//     public int Ordinal()
//     {
// 		return oriented;
//     }
// }


// Path: src/com/android/panoramagl/iphone/EAGLContext.java
import android.util.Log;
import android.view.SurfaceView;
import com.android.panoramagl.iphone.enumeration.EAGLRenderingAPI;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL10;

/*
 * This file is part of the PanoramaGL library for Android.
 *
 *  Authors: Javier Baez <javbaezga@gmail.com> and Miguel auay <mg_naunay@hotmail.com>
 *
 *  $Id$
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of
 * the License
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package com.android.panoramagl.iphone;




public class EAGLContext
{	
	private EGLContext context;
	private EGLConfig[] configs;
	private EGLDisplay display;
	private EGLSurface surface;
	
	public EGLConfig[] getConfigs()
	{
		return configs;
	}
	
	public EGLDisplay getDisplay()
	{
		return display;
	}
	
	public EGLContext getContext()
	{
		return context;
	}
	
	void setSurface(EGLSurface surface)
	{
		this.surface = surface;
	}
	
	public EGLSurface getSurface()
	{
		return this.surface;
	}
		
	public EAGLContext(EAGLRenderingAPI api) throws Exception
	{
		 this.api = api;
		 
		 if(api == EAGLRenderingAPI.kEAGLRenderingAPIOpenGLES1)