Jump to content
  • Advertisement
Sign in to follow this  
mattropo1is

OpenGL XRGB frame buffer format on GLES

This topic is 498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

eglChooseConfig() allows you to specify a set of config attributes for color depths (EGL_RED_SIZE/etc.) for your frame buffer. However, there doesn't seem to be a way to specify the format such as ARGB, RGBA, XRGB, RGBX as is possible in DirectX. You seem to be able to do this for textures, but not during initial frame buffer context setup for OpenGL ES 3+.

Is that correct? Are there no ways to specify XRGB vs ARGB explicit?  

I know I can practically do this by creating an RGBA format and then always assuming the A is 255 in shaders. My goal would be to get XRGB format.

 

Share this post


Link to post
Share on other sites
Advertisement

If I recall properly, XRGB is a 32 bits format with an ignored component ? (the X)

Why don't you create an RGBA surface with ignored alpha ?

Share this post


Link to post
Share on other sites
XRGB is just ARGB but it tells the driver that it's allowed to perform some micro optimisations, link treating a (1,1,1,0) write mask as (1,1,1,1) if it likes, as you don't care about the contents of the alpha channel.
The system of letting it configure the backbuffer format from a vague description is even better for this purpose.

Why do you want to force BGRA byte ordering in memory for a buffer that only the OS/hardware is going to read from?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!