title: If i use glTranslatex instead of glTranslatef, i don't see anything !
body: <p>i am writting a little program in OpenGL ES for Android (api 3) that show a white triangle upon a black screen. But what was my astonishment when i noticed that changing a call to glTranslatef to glTranslatex (in onDrawFrame() method) made my triangle invisible ! Could anybody explain me what is happening.</p>
  
  <p>Here my code for the Renderer </p>
  
  <pre><code>import javax.microedition.khronos.egl.EGLConfig;
  import javax.microedition.khronos.opengles.GL10;
  
  import android.opengl.GLSurfaceView.Renderer;
  import android.opengl.GLU;
  
  public class TheRenderer implements Renderer {
  
  @Override
  public void onDrawFrame(GL10 gl) {
      gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glLoadIdentity();
  
      gl.glTranslatef(0, 0, -6); // Here my problem
      triangle.draw(gl);
  }
  
  @Override
  public void onSurfaceChanged(GL10 gl, int width, int height) {
      if (height == 0)
          height = 1;
      gl.glViewport(0, 0, width, height);
  
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadIdentity();
      GLU.gluPerspective(gl, 60.0f, (float) width / (float) height, 1, 10);
  }
  
  @Override
  public void onSurfaceCreated(GL10 gl, EGLConfig config) {
  
  }
  
  private GLSimple2DTriangle triangle = new GLSimple2DTriangle();
  }
  </code></pre>
  
  <p>Here the code for Triangle</p>
  
  <pre><code>import java.nio.ByteBuffer;
  import java.nio.ByteOrder;
  import java.nio.ShortBuffer;
  
  import javax.microedition.khronos.opengles.GL10;
  
  public class GLSimple2DTriangle {
  
      public GLSimple2DTriangle(){
          buildVerticesBuffer();
      }
  
      public void draw(GL10 gl){
          gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
          gl.glVertexPointer(COORDS_PER_VERTEX, GL10.GL_SHORT, 0, verticesBuffer);
          gl.glDrawArrays(GL10.GL_TRIANGLES, 0, VERTICES_NUMBER);
          gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
      }
  
      private void buildVerticesBuffer(){
          final short vertices [] = {
                  +0, +1,
                  +1, -1,
                  -1, -1
          };
  
          ByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * SHORTS_SIZE_BYTES);
          byteBuffer.order(ByteOrder.nativeOrder());
          verticesBuffer = byteBuffer.asShortBuffer();
          verticesBuffer.put(vertices);
          verticesBuffer.rewind();
      }
  
      private ShortBuffer verticesBuffer;
      private static final byte SHORTS_SIZE_BYTES = 2;
      private static final byte COORDS_PER_VERTEX = 2;
      private static final byte VERTICES_NUMBER = 3;
  }
  </code></pre>
  
  <p>Regards</p>