mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-11 01:48:09 +00:00
[client] egl: RGB24 improvements
This patch performs several changes. * Alters the fourcc codes to types that ignore the alpha channel where possible to allow the gpu to internally use 24-bit formats. * Attempts to use DRM_FORMAT_RGB888 first as some GPUs may support this * If DMABUF is not in use the data is now imported directly as RGB24 without the post-processing shader
This commit is contained in:
@@ -132,7 +132,8 @@ EGL_TexStatus egl_texBufferProcess(EGL_Texture * texture)
|
||||
return EGL_TEX_STATUS_OK;
|
||||
}
|
||||
|
||||
EGL_TexStatus egl_texBufferGet(EGL_Texture * texture, GLuint * tex)
|
||||
EGL_TexStatus egl_texBufferGet(EGL_Texture * texture, GLuint * tex,
|
||||
EGL_PixelFormat * fmt)
|
||||
{
|
||||
TextureBuffer * this = UPCAST(TextureBuffer, texture);
|
||||
*tex = this->tex[0];
|
||||
@@ -260,7 +261,8 @@ EGL_TexStatus egl_texBufferStreamProcess(EGL_Texture * texture)
|
||||
return EGL_TEX_STATUS_OK;
|
||||
}
|
||||
|
||||
EGL_TexStatus egl_texBufferStreamGet(EGL_Texture * texture, GLuint * tex)
|
||||
EGL_TexStatus egl_texBufferStreamGet(EGL_Texture * texture, GLuint * tex,
|
||||
EGL_PixelFormat * fmt)
|
||||
{
|
||||
TextureBuffer * this = UPCAST(TextureBuffer, texture);
|
||||
|
||||
@@ -298,7 +300,7 @@ EGL_TexStatus egl_texBufferBind(EGL_Texture * texture)
|
||||
GLuint tex;
|
||||
EGL_TexStatus status;
|
||||
|
||||
if ((status = texture->ops.get(texture, &tex)) != EGL_TEX_STATUS_OK)
|
||||
if ((status = texture->ops.get(texture, &tex, NULL)) != EGL_TEX_STATUS_OK)
|
||||
return status;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
|
Reference in New Issue
Block a user