When rendering a texture region in android as opposed to getting the image (which i get in desktop), i get just black boxes instead of the image. I have a feeling it would be to do with the unusual 4495*260px size of the image. Here is the code for the texture region:
walkSheet = new Texture(Gdx.files.internal("data/spritesheet5.png"));
upFarmer1 = new Sprite (walkSheet, 0, 0, 145, 130);
upFarmer2 = new Sprite (walkSheet, 170, 0, 170, 170);
upFarmer3 = new Sprite (walkSheet, 340, 0, 170, 170);
upFarmer4 = new Sprite (walkSheet, 680, 0, 170, 170);
upFarmer5 = new Sprite (walkSheet, 0, 170, 170, 170);
upFarmer6 = new Sprite (walkSheet, 170, 170, 170, 170);
upFarmer7= new Sprite (walkSheet, 340, 170, 170, 170);
upFarmer8= new Sprite (walkSheet, 680, 170, 170, 170);
TextureRegion[][] tmp = TextureRegion.split(walkSheet, walkSheet.getWidth()/FRAME_COLS, walkSheet.getHeight()/FRAME_ROWS); // #10
walkFrames = new TextureRegion[FRAME_COLS * FRAME_ROWS];
int index = 0;
for (int i = 0; i < FRAME_ROWS; i++) {
for (int j = 0; j < FRAME_COLS; j++) {
walkFrames[index++] = tmp[i][j];
}
}
// walkAnimation = new Animation(0.225f, walkFrames); // #11
walkAnimation = new Animation(1/90f, walkFrames); // #11
spriteBatch = new SpriteBatch(); // #12
stateTime = 0f;
}
I have been using libgdx, which i believe uses the GL20 or GL10, however i have had little experience with these, and if they are the problem please direct me to the location where I am to solve the problem within the application.