Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
/** * */ package net.obviam.opengl; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.R.integer; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.opengl.GLSurfaceView.Renderer; import android.opengl.GLU; import android.view.Display; /** * @author impaler * */ public class GlRenderer implements Renderer { private Square square; // the square private Renderable pig; private Context context; private Activity activity; private int viewX = 0; private int viewY = 0; private int viewWidth; private int viewHeight; /** Constructor to set the handed over context */ public GlRenderer(Activity context) { //should be passing Context this.context = context; this.activity = activity; // initialise the square this.square = new Square(); this.pig = new Renderable(); } @Override public void onDrawFrame(GL10 gl) { // clear Screen and Depth Buffer gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // Reset the Modelview Matrix - //matrix = described translations and rotations of object gl.glLoadIdentity(); //resetting stuff, keeps camera at -5 // Drawing - location x y z //gl.glTranslatef(0, 0.0f, -0.0f); // move z units INTO the screen is the same as moving the camera 5 units away //gl.glScalef(0.5f, 0.5f, 0.5f); // scale the square to 50% // otherwise it will be too large pig.draw(gl); //don't forget to load the image! //trying to move the camera... //Display display = activity.getWindowManager().getDefaultDisplay(); //throws an error //int width = display.getWidth(); //int height = display.getHeight(); gl.glViewport(viewX, viewY,viewWidth, viewHeight); //x, y, width, height acts alot like vcam //viewX += 1; } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { if(height == 0) { //Prevent A Divide By Zero By height = 1; //Making Height Equal One } viewWidth = width; viewHeight = height; gl.glViewport(0, 0, width, height); //Reset The Current Viewport gl.glMatrixMode(GL10.GL_PROJECTION); //Select The Projection Matrix gl.glLoadIdentity(); //Reset The Projection Matrix //Calculate The Aspect Ratio Of The Window GLU.gluPerspective(gl, 45.0f, (float)width / (float)height, 0.1f, 100.0f); gl.glMatrixMode(GL10.GL_MODELVIEW); //Select The Modelview Matrix gl.glLoadIdentity(); //Reset The Modelview Matrix } @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { // Load the texture for the square square.loadGLTexture(gl, this.context); pig.loadGLTexture(gl, this.context,"pig_up"); gl.glEnable(GL10.GL_TEXTURE_2D); //Enable Texture Mapping ( NEW ) gl.glShadeModel(GL10.GL_SMOOTH); //Enable Smooth Shading gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); //Black Background gl.glClearDepthf(1.0f); //Depth Buffer Setup gl.glEnable(GL10.GL_DEPTH_TEST); //Enables Depth Testing gl.glDepthFunc(GL10.GL_LEQUAL); //The Type Of Depth Testing To Do //Really Nice Perspective Calculations gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); } }