[Android Software Development] gambiting:
I changed the resolution of the texture for tiles to 64x64(so it's 6kb now) and it isn't running any better....I guess it doesn't have anything to do with textures, I guess there is some instruction that consumes lots of computing power,and it gets executed with every object,so the more I have them,the slower it runs....

That's the main function for drawing the frame:

public void onDrawFrame(GL10 gl) {

gl.glDisable(GL10.GL_DITHER);
gl.glEnable(GL10.GL_SCISSOR_TEST);
gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glScissor(0, 0, _width, _height);
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,GL10.GL_FASTEST);
gl.glShadeModel(GL10.GL_SMOOTH);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();
GLU.gluPerspective(gl, 50, (float)(800.0/480.0), 1, 100);

gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BITS);

GLU.gluLookAt(gl, _xValue, _yValue+5, -5, _xValue, _yValue-2, 0.0f, 0.0f,-1.0f,0.0f); //camera

//main cube with gradient
gl.glPushMatrix();
gl.glTranslatef(_xValue, _yValue, 0.0f);
mCube.draw(gl);
gl.glPopMatrix();

//lots of small textured cubes
for(int i=0;i<40;i++)
{
gl.glPushMatrix();
gl.glScalef(0.5f, 0.5f, 0.5f);
gl.glTranslatef(boxArrayX[i],boxArrayY[i],0);
tcube.draw(gl);
gl.glPopMatrix();
}

//draw the ground in tiles:
gl.glPushMatrix();
gl.glTranslatef(-16.0f, -16.0f, 1f);
for(int x=0;x<5;x++)
{

for(int y=0;y<5;y++)
{

gl.glPushMatrix();
gl.glScalef(4, 4, 0);
tsurface.draw(gl);
gl.glPopMatrix();
gl.glTranslatef(0,8,0);
}
gl.glTranslatef(8, 0, 0);
gl.glTranslatef(0, -40, 0);
}
gl.glPopMatrix();

}

That's a drawing routine for the textured boxes(I got it from a tutorial,so this is not mine):

public void draw(GL10 gl)
{
gl.glColorPointer(4, GL10.GL_FIXED, 0, colBuf);
gl.glEnable(GL10.GL_TEXTURE_2D);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(0));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_TU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_TD);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(1));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_BU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_BD);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(2));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_NU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_ND);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(3));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_SU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_SD);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(4));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_WU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_WD);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(5));
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_OU);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdUBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, vrtBuf_OD);
gl.glTexCoordPointer(2,GL10.GL_FLOAT,0,crdDBuf);
gl.glDrawElements(GL10.GL_TRIANGLES, 3, GL10.GL_UNSIGNED_BYTE, ixdBuf);

}

that's a routine for drawing the gradient box:

public void draw(GL10 gl)
{
gl.glDisable(GL10.GL_TEXTURE_2D);
gl.glPushMatrix();
gl.glScalef(0.5f, 0.5f, 0.5f);
gl.glVertexPointer(3, gl.GL_FIXED, 0, mVertexBuffer);
gl.glColorPointer(4, gl.GL_FIXED, 0, mColorBuffer);
gl.glDrawElements(gl.GL_TRIANGLES, 36, gl.GL_UNSIGNED_BYTE, mIndexBuffer);
gl.glPopMatrix();
}

routine for drawing the TSurface object(so ground tile) is just like drawing a top side of the textured box, I took the code from there.

So as far as I recon, this is all the code that executes in one frame. Do you see anything wrong with it?

EDIT: Yeah,and I checked now - changed both textures to 8x8.....still runs very choppy. So it's definitely not a problem with textures.