Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have Nexsus 4,Samsung 3 and several HTCs and my game works fine.

When I launch on Samsung 4 I see white rectangles (empty textures),

no errors,

Further, my game uses sensors but I see on Samsung 4 it doesn't work too,

any ideas,

[EDIT]

on Samsung 3 works!

I heard that they did a lot of changes with S4

[EDIT 2]

This is how I load textures:

public void loadTextures(GL10 gl, Context context){

    //Log.e(LOG_TAG, "DevQuestSprites :: loadTextures");  

    InputStream is;
    Bitmap bitmap;
    is = context.getResources().openRawResource(R.drawable.fly_a1_sprite);


    bitmap = BitmapFactory.decodeStream(is);
    try {
        is.close();
        is = null;
    } catch (IOException e) {
    }

    gl.glGenTextures(textureCount, textures, 0);

    gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
    gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
    gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
    GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

    bitmap.recycle(); 

}

For me most impotent row is:

GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);

Here actually I put texture.

And this is draw method:

    public void draw(GL10 gl,
        ...
                    ...
        )
{   

     ...

    //gl.glMatrixMode(GL10.GL_MODELVIEW);

    gl.glTranslatef(transx, transy, 0.0f);

    gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

    gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, floatBufferArray[mFrame]);

    gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
    gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
    gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
    gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length / 3);
    //gl.glDrawElements(GL10.GL_TRIANGLES, 1, GL10.GL_UNSIGNED_SHORT, vertexBuffer);
    gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
    gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
}

[EDIT 3]

I added to draw, onDrawFrame and main loop, no errors:

int error = gl.glGetError();
    if (error != 0)
        Log.e("main loop", "Draw " + error); 

After debugging I found only one new error for Samsung 4:

08-07 12:57:53.356: E/ViewRootImpl(29124): sendUserActionEvent() mView == null

share|improve this question

closed as off-topic by Anko, Trevor Powell, Byte56 Mar 11 at 22:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Anko, Trevor Powell, Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Are you checking for OpenGL errors? –  msell Aug 7 '13 at 9:20
    
See my edit, thanks –  Maxim Shoustin Aug 7 '13 at 10:02

Browse other questions tagged or ask your own question.