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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:33:08+00:00 2026-05-21T11:33:08+00:00

I have played for a while with OpenGL on Android on various devices. And

  • 0

I have played for a while with OpenGL on Android on various devices. And unless I’m wrong, the default rendering is always performed with the RGB565 pixel format.

I would however like to render more accurate colors using RGB888.

The GLSurfaceView documentation mentions two methods which relate to pixel formats:

  • the setFormat() method exposed by SurfaceHolder, as returned by SurfaceView.getHolder()
  • the GLSurfaceView.setEGLConfigChooser() family of methods

Unless I’m wrong, I think I only need to use the later. Or is using SurfaceHolder.setFormat() relevant here?

The documentation of the EGLConfigChooser class mentions EGL10.eglChooseConfig(), to discover which configurations are available.

In my case it is ok to fallback to RGB565 if RGB888 isn’t available, but I would prefer this to be quite rare.

So, is it possible to use RGB888 on most devices?

Are there any compatibility problems or weird bugs with this?

Do you have an example of a correct and reliable way to setup the GLSurfaceView for rendering RGB888?

  • 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-21T11:33:09+00:00Added an answer on May 21, 2026 at 11:33 am

    On newer devices, most of them should support RGBA8888 as a native format. One way to force RGBA color format is to set the translucency of the surface, you’d still want to pick the EGLConfig to best guess the config for the channels in addition to the depth and stencil buffers.

    setEGLConfigChooser(8, 8, 8, 8, 0, 0);
    getHolder().setFormat(PixelFormat.RGBA_8888); 
    

    However, if I read your question correctly you’re asking for RGB888 support (alpha don’t care) in other words, RGBX8888 which might not be supported by all devices (driver vendor limitation).

    Something to keep in mind about performance though, since RGBA8888 is the color format natively supported by most GPUs hardware it’s best to avoid any other color format (non natively supported) since that usually translate into a color conversion underneath adding non necessary work load to the GPU.

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

Sidebar

Related Questions

I have played for a while writing XPath but am unable to come up
I have played around with Scala for a while now, and I know that
While I have played with parts of Qt in the past I am thinking
I have played with the idea of using a wiki (MediaWiki) to centralize all
I have played around with smart phone development (windows ce), and it seemed pretty
Right, I have a video ready for it to be played on start up
I'm a newbie programmer and I have played around with the SDK for a
I have been using joinedsubclass inheritence mapping for a while and decided to switch
I have a fairly simple script but something is going wrong and I can't
i have placed a SqlDataSource component on my aspx page but while configuring the

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.