Hi,
I have the same problem reported by one user of my game (for Galaxy S2).
Textures that are rotated are either completely invisible or rendered
incorrectly.

I use opengl 1.0, without VBO and without mipmapping.
As I do not have access to galaxy S2 I would be grateful if you post your
solution once you find it.

thanks
marcin

On Tue, Sep 6, 2011 at 1:03 AM, emanuele padula <[email protected]> wrote:

> Thank you Christopher. I'll do some test regarding the mipmapping, but i'm
> not sure that it will work. Thank you for you suggestion.
>
>
> 2011/9/5 Christopher Van Kirk <[email protected]>
>
>> I'm seeing a similar problem on that device, but I haven't spent any time
>> looking for an answer yet. I see that you're using VBOs...I've read
>> somewhere that some devices have trouble with them but I don't know if it's
>> true or which devices might be affected. I also know that in my case I'm
>> also using VBOs, but I'm not rotating the texture, I'm stretching it without
>> a mipmap, and it's a JPEG.
>>
>> Sorry couldn't be more help.
>>
>>
>> On 9/5/2011 10:15 PM, pad wrote:
>>
>>> Hi,
>>> I have a huge problem ONLY with SAMSUNG GALAXY S2 and i cannot figure
>>> out if the problem is my code or of this device!!
>>>
>>> ON ALL OTHER PHONES IT WORKS GREAT!!
>>>
>>> I'm Using ONLY OpenGL 1.0.
>>>
>>> The problem is that with the code below my game cannot draw the object
>>> that need rotation (the objects are not visualized on the screen).
>>> Objects with no rotation (angle = 0.0) are drawn perfectly.
>>>
>>> ONLY on samsung galaxy s2 the rotated images are not visualized on the
>>> screen. There is some bug in SG2 that i have to take in cosideration
>>> or some specific initialization?
>>>
>>> Can you help me???
>>>
>>> Thank you in advance
>>>
>>> public static void drawBitmap(final GL10 gl, final float x, final
>>> float y,
>>>          final float rotate_x, final float rotate_y, final MyImage m,
>>> final float angle) {
>>>
>>>       // Draw using verts or VBO verts.
>>>       gl.glPushMatrix();
>>>       // gl.glLoadIdentity();
>>>
>>>       final int indexPerTile = TextureManager.INDEX_PER_TILE;
>>>       final int indexRow = m.fx.row * TextureManager.INDEX_PER_TILE
>>>             * TextureManager.TILE_PER_ROW;
>>>
>>>       if (angle == 0.0f) {
>>>
>>>                        gl.glTranslatef(x, y, 0f);
>>>                        gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>>                    m.fx.grid.drawStrip(gl, true, indexRow,
>>> indexPerTile);// the
>>> code of this method is below
>>>
>>>                         if (m.alpha != 1 || m.red != 1 || m.blue != 1 ||
>>> m.green != 1) {
>>>                                gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>>>                         }
>>>
>>>       } else {
>>>
>>>          final float xt = rotate_x;
>>>          final float yt = rotate_y;
>>>          gl.glTranslatef(xt, yt, 0f);
>>>          gl.glRotatef(-angle, 0f, 0f, 1.0f);
>>>          gl.glTranslatef(-xt + x, -yt + y, 0f);
>>>          gl.glScalef(m.scaleWidth, m.scaleHeight, 1);
>>>
>>>          m.fx.grid.drawStrip(gl, true, indexRow, indexPerTile); // the
>>> code of this method is below
>>>
>>>          if (m.alpha != 1 || m.red != 1 || m.blue != 1 || m.green !=
>>> 1) {
>>>             gl.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
>>>          }
>>>       }
>>>
>>>       gl.glPopMatrix();
>>>    }
>>>
>>>
>>>    public void drawStrip(final GL10 gl, final boolean useTexture,
>>> final int startIndex,
>>>          final int indexCount) {
>>>       int count = indexCount;
>>>       if (startIndex + indexCount>= this.mIndexCount) {
>>>          count = this.mIndexCount - startIndex;
>>>       }
>>>
>>>       gl.glDrawElements(GL10.GL_**TRIANGLES, count,
>>> GL10.GL_UNSIGNED_SHORT,
>>>            this.mIndexBuffer.position(**startIndex));
>>>
>>>    }
>>>
>>>
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to