mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-04 01:34:13 +00:00
[host/client] added experimental RGBA16 float support (EGL only)
This commit is contained in:
@@ -197,6 +197,11 @@ bool egl_desktop_update(EGL_Desktop * desktop, const bool sourceChanged, const L
|
||||
desktop->shader = &desktop->shader_generic;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_RGBA16F:
|
||||
pixFmt = EGL_PF_RGBA16F;
|
||||
desktop->shader = &desktop->shader_generic;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_YUV420:
|
||||
pixFmt = EGL_PF_YUV420;
|
||||
desktop->shader = &desktop->shader_yuv;
|
||||
|
@@ -219,6 +219,19 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
|
||||
texture->pboBufferSize = height * stride;
|
||||
break;
|
||||
|
||||
case EGL_PF_RGBA16F:
|
||||
planeCount = 1;
|
||||
texture->bpp = 8;
|
||||
texture->format = GL_RGBA;
|
||||
texture->planes[0][0] = width;
|
||||
texture->planes[0][1] = height;
|
||||
texture->planes[0][2] = stride / 8;
|
||||
texture->offsets[0] = 0;
|
||||
texture->intFormat = GL_RGB16;
|
||||
texture->dataType = GL_FLOAT;
|
||||
texture->pboBufferSize = height * stride;
|
||||
break;
|
||||
|
||||
case EGL_PF_YUV420:
|
||||
planeCount = 3;
|
||||
texture->bpp = 4;
|
||||
|
@@ -32,6 +32,7 @@ enum EGL_PixelFormat
|
||||
EGL_PF_RGBA,
|
||||
EGL_PF_BGRA,
|
||||
EGL_PF_RGBA10,
|
||||
EGL_PF_RGBA16F,
|
||||
EGL_PF_YUV420
|
||||
};
|
||||
|
||||
|
@@ -440,6 +440,11 @@ static int frameThread(void * unused)
|
||||
lgrFormat.bpp = 32;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_RGBA16F:
|
||||
dataSize = lgrFormat.height * lgrFormat.pitch;
|
||||
lgrFormat.bpp = 64;
|
||||
break;
|
||||
|
||||
case FRAME_TYPE_YUV420:
|
||||
dataSize = lgrFormat.height * lgrFormat.width;
|
||||
dataSize += (dataSize / 4) * 2;
|
||||
|
Reference in New Issue
Block a user