mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[all] add initial support for RGB24-bpp support
This commit is contained in:
@@ -340,8 +340,12 @@ bool egl_desktopSetup(EGL_Desktop * desktop, const LG_RendererFormat format)
|
||||
pixFmt = EGL_PF_RGBA16F;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_BGR:
|
||||
pixFmt = EGL_PF_BGR;
|
||||
case FRAME_TYPE_BGR_32:
|
||||
pixFmt = EGL_PF_BGR_32;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_RGB_24:
|
||||
pixFmt = EGL_PF_BGR_24;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -38,7 +38,8 @@ typedef enum EGL_PixelFormat
|
||||
EGL_PF_BGRA,
|
||||
EGL_PF_RGBA10,
|
||||
EGL_PF_RGBA16F,
|
||||
EGL_PF_BGR
|
||||
EGL_PF_BGR_32,
|
||||
EGL_PF_RGB_24
|
||||
}
|
||||
EGL_PixelFormat;
|
||||
|
||||
|
@@ -111,7 +111,7 @@ static bool egl_filterBGRtoBGRASetup(EGL_Filter * filter,
|
||||
{
|
||||
EGL_FilterBGRtoBGRA * this = UPCAST(EGL_FilterBGRtoBGRA, filter);
|
||||
|
||||
if (pixFmt != EGL_PF_BGR)
|
||||
if (pixFmt != EGL_PF_BGR_32 || pixFmt != EGL_PF_RGB_24)
|
||||
return false;
|
||||
|
||||
if (this->useDMA != useDMA)
|
||||
|
@@ -109,7 +109,7 @@ static bool egl_texFBUpdate(EGL_Texture * texture, const EGL_TexUpdate * update)
|
||||
update->rectCount * sizeof(FrameDamageRect));
|
||||
damage->count += update->rectCount;
|
||||
|
||||
if (texture->format.pixFmt == EGL_PF_BGR)
|
||||
if (texture->format.pixFmt == EGL_PF_BGR_32)
|
||||
{
|
||||
FrameDamageRect scaledDamageRects[damage->count];
|
||||
for (int i = 0; i < damage->count; i++)
|
||||
|
@@ -34,7 +34,8 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
|
||||
{
|
||||
//EGL has no support for 24-bit formats, so we stuff it into a 32-bit
|
||||
//texture to unpack with a shader later
|
||||
case EGL_PF_BGR:
|
||||
case EGL_PF_BGR_32:
|
||||
case EGL_PF_RGB_24:
|
||||
// fallthrough
|
||||
|
||||
case EGL_PF_BGRA:
|
||||
|
@@ -787,7 +787,13 @@ static enum ConfigStatus configure(struct Inst * this)
|
||||
this->dataFormat = GL_HALF_FLOAT;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_BGR:
|
||||
case FRAME_TYPE_RGB_24:
|
||||
this->intFormat = GL_RGB8;
|
||||
this->vboFormat = GL_RGB;
|
||||
this->dataFormat = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_BGR_32:
|
||||
this->intFormat = GL_RGB8;
|
||||
this->vboFormat = GL_BGR;
|
||||
this->dataFormat = GL_UNSIGNED_BYTE;
|
||||
|
@@ -681,7 +681,8 @@ int main_frameThread(void * unused)
|
||||
lgrFormat.bpp = 64;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_BGR:
|
||||
case FRAME_TYPE_BGR_32:
|
||||
case FRAME_TYPE_RGB_24:
|
||||
lgrFormat.bpp = 24;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user