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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:35:22+00:00 2026-05-25T19:35:22+00:00

I am creating a live wallpaper using openGL ES 2.0. The app works great

  • 0

I am creating a live wallpaper using openGL ES 2.0.
The app works great in my nexus one but it doesn’t not show anything in a Nexus S.

Things I have tested so far:

  • I have already checked this question. My texture is 128×128 so I guess this isn’t the issue.

  • I have used the checkGlError method in my code and I found that it passes the onSurfaceCreated and onSurfaceChanged without issues. The method throws an exception if I call it in the first line of the onDrawFrame() method.

The checkGlError code is the following:

private void checkGlError(String op) {
    int error;
    while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
        Log.e(TAG, op + ": glError " + error);
        throw new RuntimeException(op + ": glError " + error);
    }
}

I notice that the error occurs in both devices, but it looks critical in the nexus S while it draws fine in the nexus one. My guess is that the shader is not compiled correctly and there is an issue there.

Do you know other incompatibilities between the nexus S and the nexus one?
Is there a way of debugging shader’s code?

  • 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-25T19:35:22+00:00Added an answer on May 25, 2026 at 7:35 pm

    In the end my issue was related to this question.

    When reading from resources Android resized my texture. I solved it reading the texture from the raw folder:

    public void loadBitmap(int resourceId) {
    
            textureId = resourceId;
    
            /* Get the texture */
            InputStream is = mContext.getResources().openRawResource(textureId);
            Bitmap bitmap;
    
            try {
                bitmap = BitmapFactory.decodeStream(is);
            } finally {
                try {
                    is.close();
                } catch (IOException e) {
                    // Ignore.
                }
            }
    
            int width = bitmap.getWidth();
            int height = bitmap.getHeight();
    
            Buffer data = ByteBuffer.allocateDirect(width * height * 4);
            bitmap.copyPixelsToBuffer(data);
            data.position(0);
    
            // Bind the texture object
            GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextures.get(0));
            ...
            // OpenGL stuff
            ...
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a live streaming app, but I'm stuck at a certain point.
I'm creating a live streaming app, but I have an issue on which media
I am creating an application in which I am using Live Id authentication. When
I am creating a Live Wallpaper and I'm painting to the canvas on every
Hey there- I'm creating a Live Wallpaper which includes text that is drawn directly
I'm creating an app that in addition to the live production environment requires a
I created android live wallpaper application using AndEngine library. The wallpaper has a swing
I have been working on creating a live wallpaper lately by placing a bitmap
I built my first Android app. It is a Live Wallpaper designed for 2.2.
I'm using jquery and creating event handlers like this: $('#some_selector a.add').live('click', function(){...}); However, I

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.