Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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,


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 = null;
    } catch (IOException e) {

    gl.glGenTextures(textureCount, textures, 0);

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



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.glTranslatef(transx, transy, 0.0f);

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

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

    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);

[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


Since its closed I can answer into my question:

The reason was pretty simple:

All images should be resized to 2^x pixels. For example:

  • 64x64
  • 64x128
  • 128x1024
  • 512x1024

and so on

share|improve this question

closed as off-topic by Anko, Trevor Powell, Byte56 Mar 11 '14 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.