title: Using glScissor in android OpenGL
body: <p>I want to render only a party of my screen according to my internal app logic.
  But i am facing issues giving parameters to <code>glScissor</code>.</p>
  
  <p>This is my <code>onDrawFrame</code> method:</p>
  
  <pre><code>@Override
  public void onDrawFrame(GL10 gl) {
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadIdentity();
  
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glLoadIdentity();
  
      gl.glEnable(GL10.GL_BLEND);
      gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
      gl.glShadeModel(GL10.GL_FLAT);
      gl.glEnable(GL10.GL_TEXTURE_2D);
  
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glPushMatrix();
      gl.glScissor(250,250,300,300);
  
      gl.glEnable(GL10.GL_SCISSOR_TEST);
  
      gl.glViewport(250,250,300,300);
  
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
  
      attack.draw(gl);
  
      gl.glDisable(GL10.GL_SCISSOR_TEST);
  
      gl.glPopMatrix();
  }
  </code></pre>
  
  <p>250,250,300,300 are just values i gave for testing... But the screen content is drawn at multiple places of the screen repetitively....</p>
  
  <p>I am mapping my screen cordinates to OpenGL cordinates in my <code>attact.draw</code> (attack is the object of one of my class) using <code>2*x/width-1</code> , <code>2*y/height-1</code></p>
  
  <p>Can someone tell me what mistake i am doing using <code>glScissor</code> and guide me through to the correct way of doing it.</p>