package com.looptek.AndroidOpenGLESPowenko;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.view.MotionEvent;

public class TutorialPart013ClearGLSurfaceView extends GLSurfaceView {

	  public  TutorialPart013OpenRenderer mRenderer;

	  public TutorialPart013ClearGLSurfaceView(Context context) {
	        mRenderer = new TutorialPart013OpenRenderer(context);

	    public boolean onTouchEvent(final MotionEvent event) {
	        queueEvent(new Runnable(){
	            public void run() {
	                mRenderer.setColor(event.getX() / getWidth(),
	                        event.getY() / getHeight(), 1.0f);
	            return true;


sample code:



By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is

Leave a Reply