Dear All,
I am new to OpenGL ES. I want to plot a sin wave on android with following points:
Code :
{-3.14, -0.00159265}, {-2.826, -0.31038}, {-2.512, -0.588816}, {-2.198, -0.809672}, {-1.884, -0.951351}, {-1.57, -1.}, {-1.256, -0.950859}, {-0.942, -0.808736}, {-0.628, -0.587528}, {-0.314, -0.308866}, {4.44089*10^-16, 4.44089*10^-16}, {0.314,   0.308866}, {0.628, 0.587528}, {0.942, 0.808736}, {1.256,   0.950859}, {1.57, 1.}, {1.884, 0.951351}, {2.198, 0.809672}, {2.512,   0.588816}, {2.826, 0.31038}, {3.14, 0.00159265}
I want something similar to this:
Click image for larger version. 

Name:	Sin Plot.jpg 
Views:	19 
Size:	6.5 KB 
ID:	2575

I have created my main activity as:
Code :
public class MainActivity extends Activity {
 
	private GLSurfaceView surface;
	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		surface = new GLSurfaceView(this);
		surface.setEGLContextClientVersion(2);
		surface.setRenderer(new Renderer());
 
		setContentView(surface);
	}
 
	public void onPause(){
		super.onPause();
		surface.onPause();		
	}
 
	public void onResume() {
		super.onResume();
		surface.onResume();
	}
}


I know I should create Renderer() and Line() classes and fragShader and vertShader but I do not know hot to do that. Would you please help me to write these 2 classes.

Thanks