Skip to content

Instantly share code, notes, and snippets.

@MichaelSnowden
Created November 16, 2013 01:23
Show Gist options
  • Save MichaelSnowden/7494625 to your computer and use it in GitHub Desktop.
Save MichaelSnowden/7494625 to your computer and use it in GitHub Desktop.
DemoProjectRenderer
package demo.project;
import android.opengl.GLSurfaceView;
import javax.microedition.khronos.opengles.GL10;
/**
* Created with IntelliJ IDEA.
* User: michaelsnowden
* Date: 11/15/13
* Time: 5:08 PM
* To change this template use File | Settings | File Templates.
*/
class DemoProjectRenderer implements GLSurfaceView.Renderer
{
public void onDrawFrame(GL10 gl)
{
gl.glClear(gl.GL_COLOR_BUFFER_BIT);
}
@Override
public void onSurfaceCreated(GL10 gl10, javax.microedition.khronos.egl.EGLConfig eglConfig) {
//To change body of implemented methods use File | Settings | File Templates.
gl10.glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
}
public void onSurfaceChanged(GL10 gl, int width, int height)
{
gl.glViewport(0, 0, width, height);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment