Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:20:36+00:00 2026-06-08T10:20:36+00:00

I have been looking for an answer but haven’t found anything specific about it.

  • 0

I have been looking for an answer but haven’t found anything specific about it.

I’d like to know what of these two examples is better related with speed and performance. Thanks in advance!

I am making a openGL ES 1.0 Android Game in 2D. For animating the characters I use different textures. I have two posibilities with the textures:

First one is to have each texture in an int Array and change which one is selected depending on the frame with:

gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[actual_id]);

On the other hand we can have a “Big” texture with all the images and just modify the Texture coordinates. In this case instead of:

private float textures[] = {
    // Mapping coordinates for the vertices
    0.0f, 1.0f,     // top left     (V2)
    0.0f, 0.0f,     // bottom left  (V1)
    1.0f, 1.0f,     // top right    (V4)
    1.0f, 0.0f      // bottom right (V3)
};

(Which would be the one in the first case) It would be:

private float textures[] = {
    // Mapping coordinates for the vertices
    0.0f, 0.5f,     // top left     (V2)
    0.0f, 0.0f,     // bottom left  (V1)
    0.5f, 0.5f,     // top right    (V4)
    0.5f, 0.0f      // bottom right (V3)
};

(Using a 2×2 box) And those coordinates should move around the texture.

I would like to know which may be the fastest. Also, if there is a third best way I’d love to know about it.

Thanks for your time. If I have to detail the question please ask me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:20:37+00:00Added an answer on June 8, 2026 at 10:20 am

    I think there is no general answer to this question because it depends on some other things.

    I assume you have a lot of other objects besides the characters to draw. Lets assume you have a game loop that looks something like this:

    while (gameNotFinished) {
      changeToTerrainTexture()
      drawTerrain()
      changeToCharacterTexture()
      drawCharacter() // the character you want to draw
      changeToHouseTexture()
      drawHouse()
      ...
    }
    

    In this case you have to change to the character texture anyway. The first way would be the better solution because the smaller texture requires less texture memory.

    But if your loop looks like this:

    while (gameNotFinished) {
      changeToTerrainTexture()
      drawTerrain()
      changeToCharacterTexture()
      for (int i = 0; i < characters.size(); i++) {
        characters.get(i).draw()
      }
      ...
    }
    

    In this case you can profit from the second way because you can display multiple characters in different animation states without changing the texture.

    I don’t know if there is any real alternative with OpenGl ES 1.0. With ES 2.0 you would have the option to use one texture for multiple animation states (like your 2nd approach) and compute the texture coordinate offsets within the shader (so you don’t need multiple texture coordinate arrays).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking for an answer to this for awhile and haven't found
I've been looking for this for a while, but haven't found an answer (blame
We've been looking for a while for an answer to this, but haven't found
I have been looking around for an answer to this, but haven't been able
I have been looking for an answer to this on Stack Overflow, but I
I've been looking for this, but can't find the answer. I have an NSMutableArray
I've been looking all over the place, but I haven't landed an answer yet.
I've been looking around Google and SO and haven't quite found an answer to
I've been looking around for a while for an answer to this, but haven't
I have been looking around for this but couldn't find an answer anywhere, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.