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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:05:18+00:00 2026-06-15T06:05:18+00:00

I am running an app that displays many bitmaps and a single translation animation.

  • 0

I am running an app that displays many bitmaps and a single translation animation. On the emulator, this works all the time with the rare exception that the width and height (derived from the device) are switched. However, on a friend’s Galaxy SIII, none of textures are showing, neither are the quads. After trying to see if the animation ran, it didn’t, yet the glClear function draws the correct color for the background. Therefore the program is still rendering. I’m using an orthographic view with the following renderer.

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.content.Context;
import android.opengl.GLSurfaceView.Renderer;


public class GLrenderer implements Renderer {

private Context context;
long startTime; 
public GLrenderer(Context context) {
    this.context = context;

}
public void onSurfaceCreated(GL10 gl, EGLConfig config) {       
    //Load the texture for the cube once during Surface creation

    MenuGameLoop.button.now.position_x=0;
    MenuGameLoop.button.past.position_x=0;
    MenuGameLoop.button.loadGLTexture(gl, this.context);
    MenuGameLoop.overlay.loadGLTexture(gl, this.context);
    for(int i=0;i<Splash.cubes.size();i++){
    Block ice=Splash.cubes.get(i);
    ice.loadGLTexture(gl, this.context, ice.width, ice.height,ice.overall,ice.subWidth, ice.subHeight);
    }
    gl.glEnable(GL10.GL_BLEND);
    gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
    gl.glEnable(GL10.GL_TEXTURE_2D);            
    gl.glShadeModel(GL10.GL_SMOOTH);            
    gl.glClearColor(0.0f, 0.666f, 0.831f, 1f); 
    gl.glClearDepthf(1.0f);                     
    gl.glEnable(GL10.GL_DEPTH_TEST);        
    gl.glDepthFunc(GL10.GL_LEQUAL);             

    gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); 
}


public void onDrawFrame(GL10 gl) {
    gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);    
    gl.glLoadIdentity();
    MenuGameLoop.overlay.draw(gl);      
    gl.glPushMatrix();
    gl.glTranslatef( (float)MenuGameLoop.button.mid.position_x,(float)MenuGameLoop.button.mid.position_y+(Splash.sizeY/2), 0);  
    MenuGameLoop.button.draw(gl);

    gl.glPopMatrix();
    for(int i=0;i<Splash.cubes.size();i++){
        gl.glPushMatrix();
        Block ice=Splash.cubes.get(i);
        gl.glTranslatef (ice.posX,ice.posY, 0); 
        ice.draw(gl);
        gl.glPopMatrix();
        }

}

public void onSurfaceChanged(GL10 gl, int width, int height) {

    if(height == 0) {                   
        height = 1;                         
    }

    gl.glViewport(0, 0, width, height);     
    gl.glMatrixMode(GL10.GL_PROJECTION);    
    gl.glLoadIdentity();                    

    gl.glOrthof(0f, (float)width, (float)height, 0f, 0.1f, 100.0f);

    gl.glMatrixMode(GL10.GL_MODELVIEW);     
    gl.glLoadIdentity();                    
    }
}

If a problem can not be deduced from the above, are there any specific things I should avoid/add into other sections of 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-06-15T06:05:18+00:00Added an answer on June 15, 2026 at 6:05 am

    Please ensure that you’re using power-of-two textures.

    Also, you might pick incompatible OpenGL ES config which works on emulator but not on device.

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

Sidebar

Related Questions

I've got a Rails app that's been running live for some time, and I'm
I have this RoR app that calls to RAILS_ROOT. When running it using rails
I have got a Rails app running which displays data that is generated by
I'm running an app that pulls images using a URL into a gridView, the
I can detect that app is running under iOS Simulator (using sysctlbyname(hw.machine) ), but
I am developing a web app that will have two parts running on two
i'm creating a web app that's running on an Advantage Database server, not my
I've developed an iPhone app that has been running MPMoviePlayer (pre 3.2 SDK) with
I have a VB app that I need to monitor while it is running.
I have an RSS reader-type app that I'm running through instruments and I'm seeing

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.