View Full Version : No image format 24 bit RGB?

09-16-2008, 07:22 AM

is it possible to have an OpenVG image in format VG_lRGB_888? The spec doesn't mention this format. EGL offers a configuration with 24 bit EGL_BUFFER_SIZE and without alpha channel. How can I use it with OpenVG?


Ivo Moravec
09-16-2008, 12:20 PM
There is no enumeration in the spec for a 24-bit format type in OpenVG (only 1,8,16, and 32 bit formats). It's inconvenient, but that's how it is (though 24 bit formats are evil as they are an alignment nightmare). Use a lRGBx format (32 bit) if possible for the image format - that should work reasonably well (expect of course you'll have to do the format conversion manually for the vgImageSubData upload).

Surfaces are separate from VGImages, and hence it is possible to request a 24-bit back buffer with EGL if one is available via the EGLConfig attributes (or other weird formats like rgb332, etc).