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 7020121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:16:38+00:00 2026-05-27T23:16:38+00:00

I had implemented the possibilty for multiple textures for while now… but yesterday I

  • 0

I had implemented the possibilty for multiple textures for while now… but yesterday I found out that they won’t work as expected on other devices… not mine.. :/
On my device (Experia Mini Pro) it works perfect:

First some code-snippets for loading the texture:

int[] textureID = new int[1];        
GLES20.glDeleteTextures(1,textureID,0);
GLES20.glGenTextures(1,textureID,0);
this.unit = textureID[0];
GLES20.glActiveTexture(GLES20.GL_TEXTURE0+this.unit);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D,this.unit);     
GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_MIN_FILTER,GLES20.GL_LINEAR);
GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_MAG_FILTER,GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_WRAP_S,GLES20.GL_REPEAT);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_WRAP_T,GLES20.GL_REPEAT);

...
... bitmap loading functions
...

GLUtils.texImage2D(GLES20.GL_TEXTURE_2D,0,bitmapTexture,0);      
bitmapTexture.recycle();

and here the part where my triangles are drawn:

GLES20.glUniform1i(LLShader.location[20],gfx.imagetexture.unit);
GLES20.glActiveTexture(GLES20.GL_TEXTURE0+gfx.imagetexture.unit);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D,gfx.imagetexture.unit);
GLES20.glDrawArrays(GLES20.GL_TRIANGLES,0,gfx._vertexBuffer.capacity()/3);

On ym device everything works quite perfect: There are 4 quads, each of them with its own textureunit is drawn one after another.

But then I gave the apk to a friend of mine and on his device (Samsung Galaxy S1) it seems, that it only loads one texture and display only the first of them two…
Don’t know where to look for…. I didn’t find the bug till yet.

PS: Another bug occured, that I don’t know to handle. After “reopening” (going from sleepmode) the currently running application all images that should use alpha-blending are black… what could be the Problem ?

  • 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-05-27T23:16:39+00:00Added an answer on May 27, 2026 at 11:16 pm

    This is very similar to another case I worked on just few hours ago.

    In OpenGL ES 2.0, in case of no-power of 2 textures, the wrap mode can only be GL_CLAMP_TO_EDGE.

    This mean that, if you use a wrap mode different than GL_CLAMP_TO_EDGE it expects to have a power of 2 texture. (for instance, 512X256, 1024X1024 etc).

    The interpretation of this rule is quite open and it changes a lot depending on the device, for instance on my Motorola Defy it works, on the Galaxy TAB it does not, this could justify the behavior your are experiencing.

    Try this:

    20.glTexParameteri(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_WRAP_S,GLES20.GL_CLAMP_TO_EDGE);
    GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D,GLES20.GL_TEXTURE_WRAP_T,GLES20.GL_CLAMP_TO_EDGE);

    I hope it will do the magic.

    Maurizio Benedetti

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

Sidebar

Related Questions

I had implemented a wpf combobox into a winform and now have to somehow
I have found one website for image zooming using animate(). But in that he
i had downloaded orchard cms and was playing with it. i noticed that they
Need some help with this problem in implementing with XSLT, I had already implemented
I had started working on GPGPU some days ago and successfully implemented cholesky factorization
I was looking at how some site implemented rounded corners, and the CSS had
I've got a UITableView with custom tablecells. First I had a version which implemented
I had try to implement the send me log feature into my apps but
This is a weird question inasmuch as I've definitely had projects that work fine,
I currently have a small Python script that I'm using to spawn multiple executables,

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.