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)
public class ArRenderer implements GLSurfaceView.Renderer { private static final String TAG = ArRenderer.class.getSimpleName(); private ShortBuffer indexBuffer; private FloatBuffer vertexBuffer; private FloatBuffer colorBuffer; private float xAngle = 0; private float yAngle = 0; private float zAngle = 0; public float xAxis = 0; public float yAxis = 0; public float zAxis = 0; private float width = 320f; private float height = 480f; @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { initTriangle(); gl.glMatrixMode(GL10.GL_PROJECTION); float ratio = width / height; float size = .01f * (float) Math.tan(Math.toRadians(45.0) / 2); //orthographic projection //gl.glOrthof(-1, 1, -1 / ratio, 1 / ratio, 0.01f, 100.0f); //perspective gl.glFrustumf(-size, size, -size / ratio, size / ratio, -0.01f, 100.0f); gl.glViewport(0, 0, (int) width, (int) height); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glEnable(GL10.GL_DEPTH_TEST); gl.glDisable(GL10.GL_DITHER); // define the color we want to be displayed as the "clipping wall" gl.glClearColor(0, 0, 0, 0); //differentiate between visible and non visible sides gl.glEnable(GL10.GL_CULL_FACE); //the face in the front is the counter-clockwise face gl.glFrontFace(GL10.GL_CW); //which face should not be drawn gl.glCullFace(GL10.GL_BACK); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_COLOR_ARRAY); } @Override public void onSurfaceChanged(GL10 gl, int w, int h) { width = w; height = h; gl.glViewport(0, 0, w, h); } @Override public void onDrawFrame(GL10 gl) { //set fixed rotation angle gl.glLoadIdentity(); // clear the color buffer to show the ClearColor we called above... gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // define the vertices we want to draw gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer); gl.glColorPointer(4, GL10.GL_FLOAT, 0, colorBuffer); //translate the perspective //gl.glTranslatef(0f, 0f, 1.0f); //set the rotation angle (if any) gl.glRotatef(zAngle, 0, 0, 1); gl.glRotatef(xAngle, 0, 1, 0); gl.glRotatef(yAngle, 1, 0, 0); //zAxis += 0.001f; // finally draw the vertices //GL_LINE_STRIP = wireframe //GL_TRIANGLES = solid gl.glDrawElements(GL10.GL_TRIANGLES, 60, GL10.GL_UNSIGNED_SHORT, indexBuffer); } private void initTriangle() { float u = 0.525731f; float v = 0.850651f; //vertices float[] coords = { 0f, -u, v, //0 v, 0f, u, //1 v, 0f, -u, //2 -v, 0f, -u, //3 -v, 0f, u, //4 -u, v, 0f, //5 u, v, 0f, //6 u, -v, 0f, //7 -u, -v, 0f, //8 0f, -u, -v, //9 0f, u, -v, //10 0f, u, v, //11 }; float[] colors = { 1f, 0f, 0f, 1f, //red 0 1f, 1f, 0f, 1f, //yellow 1 1f, 0f, 1f, 1f, //pink 2 0f, 1f, 0f, 1f, //green 3 0f, 1f, 1f, 1f, //l.blue 4 0f, 0f, 1f, 1f, //blue 5 1f, 1f, 1f, 1f, //white 6 1f, 1f, 0f, 1f, //yellow 7 1f, 1f, 1f, 1f, //white 8 1f, 0f, 0f, 1f, //red 9 1f, 1f, 0f, 1f, //yellow 10 0f, 0f, 1f, 1f, //blue 11 }; //faces - clockwise short[] indices = new short[] { 1, 2, 6, // 1, 7, 2, // 3, 4, 5, // 4, 3, 8, // 6, 5, 11, // 5, 6, 10, // 9, 10, 2, // 10, 9, 3, // 7, 8, 9, // 8, 7, 0, // 11, 0, 1, // 0, 11, 4, // 6, 2, 10, // 1, 6, 11, // 3, 5, 10, // 5, 4, 11, // 2, 7, 9, // 7, 1, 0, // 3, 9, 8, //error? (based on color assignment) 4, 8, 0, // }; // float has 4 bytes, coordinate * 4 bytes ByteBuffer vbb = ByteBuffer.allocateDirect(coords.length * 4); vbb.order(ByteOrder.nativeOrder()); vertexBuffer = vbb.asFloatBuffer(); // short has 2 bytes, indices * 2 bytes ByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2); ibb.order(ByteOrder.nativeOrder()); indexBuffer = ibb.asShortBuffer(); // float has 4 bytes, colors (RGBA) * 4 bytes ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length * 4); cbb.order(ByteOrder.nativeOrder()); colorBuffer = cbb.asFloatBuffer(); vertexBuffer.put(coords); indexBuffer.put(indices); colorBuffer.put(colors); vertexBuffer.position(0); indexBuffer.position(0); colorBuffer.position(0); } public void setXAngle(float a) { xAngle = a; } public void setYAngle(float a) { yAngle = a; } public void setZAngle(float a) { zAngle = a; } }