title: Object not draw properly in openGl Es
body: <p>I am drawing the 3D object but its not drawing correctly. Original 3D file does not have diagonally but When I am drawing then its showing the diagonal. Please help me to why its drawing the diagonal.</p>
  
  <p>See this link : <a href="http://i.stack.imgur.com/Q4plC.png" rel="nofollow">http://i.stack.imgur.com/Q4plC.png</a></p>
  
  <p>Code </p>
  
  <pre><code>public void draw(GL10 gl) {
      //gl.glColor4f(0.0f, 1.0f, 0.0f, 0.5f);
      gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  
      gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
      gl.glDrawArrays(3, 0, v.size()/3);
      gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
      gl.glDisable(GL10.GL_CULL_FACE);
  }
  
  public void onSurfaceCreated(GL10 gl, EGLConfig config) {
      model.loadGLTexture(gl, context);
      gl.glEnable(GL10.GL_TEXTURE_2D);
      gl.glClearColor(1.0f, 0.0f, 1.0f, 1.0f);    
      gl.glClearDepthf(1.0f);
      gl.glEnable(GL10.GL_DEPTH_TEST);            
      gl.glDepthFunc(GL10.GL_LEQUAL);         
      gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); 
      gl.glShadeModel(GL10.GL_SMOOTH);            
  }
  
  /**
   * Here we do our drawing
   */
  public void onDrawFrame(GL10 gl) {
      //Clear Screen And Depth Buffer
      gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);    
      gl.glLoadIdentity();            
      gl.glTranslatef(0.0f, 0.0f, 0); //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
      model.draw(gl);                     //Draw the square
  
      xrot += xspeed;
      yrot += yspeed;
  
  }
  
  /**
   * If the surface changes, reset the view
   */
  public void onSurfaceChanged(GL10 gl, int width, int height) {
      if(height == 0) {                       //Prevent A Divide By Zero By
          height = 1;                         //Making Height Equal One
      }
  
      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, width/height, 0.1f, 500.0f);
  
      gl.glMatrixMode(GL10.GL_MODELVIEW);     //Select The Modelview Matrix
      gl.glLoadIdentity();                    //Reset The Modelview Matrix
  }
  </code></pre>
  
  <p>Thanks in advance.</p>