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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:51:56+00:00 2026-06-05T19:51:56+00:00

I am using OpenGL 2.0 on the android platform (Samsung Galaxy S2). When I

  • 0

I am using OpenGL 2.0 on the android platform (Samsung Galaxy S2).
When I set a value via the GL_fragcolor which is suppose to be a perfect shade of gray, I instead get the green component either a couple above or below the red and blue values when rendering the scene.

"   void main() {                               " +
"       vec4 c = texture2D(texture0, tCoord);   " +
"       c *= vColor;                            " +
"       gl_FragColor = vec4(c.r,c.r,c.r,1);     " + 
"   }                                           ";  

As you can see the end result of this routine above should output the same value for each component. (This is a temporary routine to exaggerate the problem of using gray-scale output)

Screen shot taken of the RGB bleeding problem. I don’t have enough points to post a pic here so uploaded it to photobucket…

http://s1267.photobucket.com/albums/jj556/mrpookie99/?action=view&current=rgb.png

So I don’t know if it is converting the 8bit value to a 565 value or something like that as I can’t find any documentation which can set the output resolution to the screen…

Thanks for any help,

Andrew.

  • 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-05T19:51:58+00:00Added an answer on June 5, 2026 at 7:51 pm

    Okay, I now know why this situation occurs…

    If you use the default settings with GLSurfaceView it creates a 16 bit deep buffer for the display @ 565 RGB…

    To get around this, I changed the default buffer from 16 bits to 32 bits and all is fixed 🙂

    http://developer.android.com/reference/android/opengl/GLSurfaceView.html

    A quote from the developer guide:
    “If no setEGLConfigChooser method is called, then by default the view will choose an RGB_565 surface with a depth buffer depth of at least 16 bits.”

    Hope this helps others in future…

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

Sidebar

Related Questions

I'm currently using OpenGL on Android to draw set width lines, which work great
I am writing an android program in which I built a box using opengl
I'm using OpenGL for Android to draw my 2D images. Whenever I draw something
Using Android opengl I need to move an object from point A to point
I want to build a 3D model of the earth using OpenGL-ES on Android.
I've been developing an Android app in Eclipse (java) using openGL ES 1.0 on
I am developing a 2d game on Android ICS using OpenGL es 2.0 and
I am new to the opengl so i am using guide of the android
I'm creating a 2d android game with OpenGL ES 1.1 and i'm not using
Okay, so I'm using Rajawali (See: http://www.rozengain.com/blog/2011/08/23/announcing-rajawali-an-opengl-es-2-0-based-3d-framework-for-android/ ) to create a 3D sphere with

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.