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 org.sickgames.opengl; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import org.sickgames.DrawableQueueObject; import org.sickgames.GameRegistry; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.opengl.GLSurfaceView.Renderer; import android.opengl.GLUtils; import android.util.Log; public class GLRenderer implements Renderer { public float mXScale = 1; public float mYScale = 1; private int mWidth; private int mHeight; private DrawableQueueObject[] drawQueue; private boolean drawQueueChanged = true; private DrawableBitmap[] drawableBitmapArray; private double mFrameRate; // Proper frame rate. private int mFrameRateFramesSinceLastSecond; // Used for frame rate. private double mFrameRateLastSecond; private Context context; public GLRenderer(Context context) { // Initialize our square. GameRegistry.setGLRendererReady(false); drawQueue = new DrawableQueueObject[512]; drawableBitmapArray = new DrawableBitmap[512]; this.context = context; } public void onDrawFrame(GL10 gl) { double now = System.currentTimeMillis() /1000; if (now < mFrameRateLastSecond + 1) { mFrameRateFramesSinceLastSecond++; } else { mFrameRateLastSecond = now; mFrameRate = mFrameRateFramesSinceLastSecond; mFrameRateFramesSinceLastSecond = 0; Log.d("GLThread", "Frames/s : " + mFrameRate); } gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); DrawableBitmap.beginDrawing(gl, mWidth, mHeight, mXScale, mYScale); synchronized (this) { if (drawQueueChanged == true) { populateBitmapArray(); drawQueueChanged = false; drawBitmapArray(gl); } } DrawableBitmap.endDrawing(gl); } public void onSurfaceChanged(GL10 gl, int width, int height) { GameRegistry.setGLRendererReady(false); mWidth = width; mHeight = height; mXScale = ((float) width) / GameRegistry.GAME_WIDTH; mYScale = ((float) height) / GameRegistry.GAME_HEIGHT; gl.glViewport(0, 0, width, height); float ratio = (float) width / height; gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10); GameRegistry.setGLRendererReady(true); } public void onSurfaceCreated(GL10 gl, EGLConfig config) { GameRegistry.setGLRendererReady(false); gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_FASTEST); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); gl.glShadeModel(GL10.GL_FLAT); gl.glDisable(GL10.GL_DEPTH_TEST); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glTexEnvx(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, GL10.GL_MODULATE); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); GameRegistry.textureFactory.loadAllTextures(gl, context); populateBitmapArray(); mFrameRate = 0; mFrameRateFramesSinceLastSecond = 0; mFrameRateLastSecond = 0; } public synchronized void setDrawQueue(DrawableQueueObject[] newDrawQueue) { drawQueue = newDrawQueue; drawQueueChanged = true; } private synchronized void populateBitmapArray() { //Clear Array for (int x = 0; x < drawableBitmapArray.length; x++) { if (drawableBitmapArray[x] != null) drawableBitmapArray[x] = null; else break; } //Populate array for (int x = 0; x < drawQueue.length; x++) { if (drawQueue[x] != null) { DrawableBitmap bitmap = new DrawableBitmap(); bitmap.mXPos = drawQueue[x].xPos; bitmap.mYPos = drawQueue[x].yPos; bitmap.mXScale = drawQueue[x].xScale; bitmap.mYScale = drawQueue[x].yScale; bitmap.setTexture(drawQueue[x].resourceId); drawableBitmapArray[x] = bitmap; } else break; } } private synchronized void drawBitmapArray(GL10 gl) { for (int x = 0; x < drawableBitmapArray.length; x++) { if (drawableBitmapArray[x] != null) { drawableBitmapArray[x].draw(gl); } else break; } } /** * This function blocks while drawFrame() is in progress, and may be used by other threads to * determine when drawing is occurring. */ public synchronized void waitDrawingComplete() { } }