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

  • Home
  • SEARCH
  • 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 7043671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:19:06+00:00 2026-05-28T02:19:06+00:00

I am developing an Android application that uses OpenGL to render a 3D ball

  • 0

I am developing an Android application that uses OpenGL to render a 3D ball on a grass field. The user can interact with the ball (rotate it by touch).

The problem is as follows: Everything works well on my Samsung Galaxy S2, but when I try it on other devices (HTC incredible S, HTC sensation, …) I get a distorted image with multiple cropped viewports on the screen (see attached image).

I have tried everything I could think of: disable textures, disable lights, etc… nothing seems to work.

I know it is hard to help without an actual code, but I don’t really know which part of the code is causing this. So I’m asking if anyone has any idea what could possibly be causing this problem.

My guess is something related to GLSurfaceView or the Renderer subclass or the order of creation of those objects…

Take a look at the attached image and let me know if you know what the problem is.

enter image description here

EDIT:
onSurfaceCreated code:

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
  gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
  gl.glShadeModel(GL10.GL_SMOOTH);
  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);
  gl.glEnable(GL10.GL_TEXTURE_2D);
  gl.glEnable(GL10.GL_NORMALIZE);
}
  • 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-28T02:19:06+00:00Added an answer on May 28, 2026 at 2:19 am

    My friend. I have experienced the same problems in the past and it was due to the depth number of bits supported by the gpu. For instance on my galaxy it supported 24bit depth buffer while on tegra2 devices only 16 if i remember well. Anyway, the sokution is during egl config choose function where u have to configure it accordingly.

    Try to post the code of th egl config so i can gelp you.

    P.s. Welcome aboard 🙂

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

Sidebar

Related Questions

I'm developing an augmented reality application for Android that uses the phone's camera to
Good evening. I'm developing an android application that uses Facebook SDK. I've no problem
I'm developing an Android application that uses a MapView . I'd like to run
I'm developing an Android application that uses the camera and will run on Android
I am developing an Android application that uses a WebView pointed at a jQueryMobile-based
I'm developing an Android application that uses a WebView to display the login page
I'm developing an Android application that uses native code. I need to add an
I am developing an android application that can send email. This following code lets
I'm currently developing an Android application that fetches images using http requests. It would
I'm developing an Android application that I'd like to be compatible with 1.5 (SDK

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.