mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:52:57 +00:00
[client] egl: fix texture import for RGB_24
This commit is contained in:
parent
49bdf046fe
commit
3843afa927
2 changed files with 9 additions and 7 deletions
|
@ -346,6 +346,11 @@ bool egl_desktopSetup(EGL_Desktop * desktop, const LG_RendererFormat format)
|
||||||
|
|
||||||
case FRAME_TYPE_RGB_24:
|
case FRAME_TYPE_RGB_24:
|
||||||
pixFmt = EGL_PF_RGB_24;
|
pixFmt = EGL_PF_RGB_24;
|
||||||
|
// the data width is correct per the format, but we are going to use a
|
||||||
|
// 32-bit texture to load the data, so we need to alter the width for the
|
||||||
|
// different bpp
|
||||||
|
desktop->format.dataWidth =
|
||||||
|
desktop->format.dataWidth / 4 * 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -361,10 +366,10 @@ bool egl_desktopSetup(EGL_Desktop * desktop, const LG_RendererFormat format)
|
||||||
if (!egl_textureSetup(
|
if (!egl_textureSetup(
|
||||||
desktop->texture,
|
desktop->texture,
|
||||||
pixFmt,
|
pixFmt,
|
||||||
format.dataWidth,
|
desktop->format.dataWidth,
|
||||||
format.dataHeight,
|
desktop->format.dataHeight,
|
||||||
format.stride,
|
desktop->format.stride,
|
||||||
format.pitch
|
desktop->format.pitch
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to setup the desktop texture");
|
DEBUG_ERROR("Failed to setup the desktop texture");
|
||||||
|
|
|
@ -81,9 +81,6 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
|
||||||
fmt->intFormat = GL_BGRA_EXT;
|
fmt->intFormat = GL_BGRA_EXT;
|
||||||
fmt->dataType = GL_UNSIGNED_BYTE;
|
fmt->dataType = GL_UNSIGNED_BYTE;
|
||||||
fmt->fourcc = DRM_FORMAT_ARGB8888;
|
fmt->fourcc = DRM_FORMAT_ARGB8888;
|
||||||
|
|
||||||
// adjust the width as the texture is 32bpp but our source is 24bpp
|
|
||||||
fmt->width = fmt->width / 4 * 3;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue