@Override public void glClear(int mask) { mGL.glClear(mask); }
/**render methods*/ @Override protected void internalRender(GL10 gl, PLIRenderer renderer) { gl.glClearColor(mColor.red, mColor.green, mColor.blue, 1.0f); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); }
@Override public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT); } });
@Override public void onDrawFrame(GL10 gl) { gl.glLoadIdentity(); GLU.gluOrtho2D(gl, 0, width, height, 0); gl.glClearColor(0.f, 0.f, 0.f, 1f); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glColor4f(1f, 1f, 1f, 1f); gl.glPushMatrix(); gl.glTranslatef(width/2, height/2, 0.0f); gl.glRotatef(360 * input, 0.0f, 0.0f, 1.0f); bgQuad.setX(0); bgQuad.setY(0); bgQuad.draw(gl); gl.glPopMatrix(); }
public void glClear(int mask) { mgl.glClear(mask); }
public void glClear(int mask) { mgl.glClear(mask); }
public void glClear(int mask) { mgl.glClear(mask); }
public void onDrawFrame( GL10 gl ) { gl.glClear( GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT ); gl.glLoadIdentity(); onSurfacePerspective( gl ); scene.onDrawFrame( gl ); onSurfaceOrtho( gl ); screen.onDrawFrame( gl ); }
public void onDrawFrame(GL10 gl) { //Clear Screen And Depth Buffer gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); //Reset The Current Modelview Matrix mg.getCurrentModelView(gl); gl.glMatrixMode(GL10.GL_PROJECTION); mg.getCurrentProjection(gl);
@Override public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // Reset the Modelview Matrix gl.glLoadIdentity(); // Drawing gl.glTranslatef(0.0f, 0.0f, -1.0f); // move 5 units INTO the screen // is the same as moving the camera 5 units away gl.glScalef(0.5f, 0.5f, 0.5f); // scale the triangle to 50% // otherwise it will be too large quad.draw(gl); }
public void drawScene(GL10 gl) { // Clear scene gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // Move left top corner of camera to specified point gl.glTranslatef(-camera.getX(), screenManager.getScreenHeight() - camera.getY(), 0f); // Render all objects from the scene root.renderObjects(gl); // Fixed position for HUD elements gl.glLoadIdentity(); // Render hud to the screen hud.renderObjects(gl); gl.glLoadIdentity(); }
@Override public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); gl.glTranslatef(0.0f, 0.0f, -10.0f); gl.glRotatef(rotation, 1.0f, 1.0f, 1.0f); cube.draw(gl); gl.glLoadIdentity(); rotation -= 0.15f; } }
@Override public void onDrawFrame(GL10 gl) { // Clear color and depth buffers using clear-value set earlier gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); // You OpenGL|ES rendering code here gl.glLoadIdentity(); GLU.gluLookAt(gl, eyex, eyey, eyez, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f); Matrix.setIdentityM(mod_matrix, 0); Matrix.setLookAtM(mod_matrix, 0, eyex, eyey, eyez, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f); DrawScene(gl); }
public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glDisable(GL10.GL_DITHER); gl.glMatrixMode(GL10.GL_MODELVIEW); //making sure OpenGL currently in model view gl.glLoadIdentity(); //clear the model view matrix to identity matrix gl.glTranslatef(0.0f, 0.0f, -10.0f); //move 10 unit backwards so as if camera moves backwards. gl.glRotatef(90.0f,0.0f,0.0f,1.0f) //rotate 90 degree around the z axis. //draw_model ... //gl.glPopMatrix(); //gl.glPopMatrix(); }
void endGLElements(GL10 gl) { vertexListManager.end(); gl.glEnable(GL10.GL_DITHER); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glLineWidth(2); vertexListManager.render(gl); }
public void onDrawFrame(GL10 gl) { // clear screen gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // set-up modelview matrix gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0, 0, -3.0f); gl.glMultMatrixf(mRotationMatrix, 0); // draw our object gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_COLOR_ARRAY); mCube.draw(gl); }
public void onDrawFrame(GL10 gl) { // clear screen gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // set-up modelview matrix gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0, 0, -3.0f); gl.glMultMatrixf(mRotationMatrix, 0); // draw our object gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_COLOR_ARRAY); mCube.draw(gl); }
public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); //Draw Triangle gl.glPushMatrix(); gl.glTranslatef(NewX, NewY, -10.0f); mTriangle.draw(gl); // Draw triangle gl.glPopMatrix(); //Draw Circle gl.glPushMatrix(); gl.glTranslatef(-1.5f, 0.0f, -20.0f); mCircle.draw(gl); gl.glPopMatrix(); }
public void onDrawFrame(GL10 gl) { //Clear Screen And Depth Buffer gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); gl.glEnable(GL10.GL_LIGHTING); gl.glTranslatef(0.0f, -1.2f, -z); //Move down 1.2 Unit And Into The Screen 6.0 gl.glRotatef(xrot, 1.0f, 0.0f, 0.0f); //X gl.glRotatef(yrot, 0.0f, 1.0f, 0.0f); //Y gl.glScalef(sizeCoef, sizeCoef, 0); // if You have a 3d object put sizeCoef as all parameters model.draw(gl); //Draw the square gl.glLoadIdentity(); xrot += xspeed; yrot += yspeed; }
public void onDrawFrame(GL10 gl) { gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); GLU.gluLookAt(gl, 0, 0, 100, 0, 0, 0, 0, 1, 0); for (int i = 0; i < obj.size; i++) { // obj is an array of positions obj = mObj[i]; gl.glPushMatrix(); gl.glTranslatef(obj.position.x(), obj.position.y(), obj.position.z()); gl.glRotatef(obj.rotation.x(), 1f, 0f, 0f); gl.glRotatef(obj.rotation.y(), 0f, 1f, 0f); gl.glRotatef(obj.rotation.z(), 0f, 0f, 1f); obj.draw(gl); // the objects 'draw' themselves gl.glPopMatrix(); } }