libobs, libobs-d3d11, libobs-opengl: Add GS_RG16

This format will be useful for P010 chroma in the future.
This commit is contained in:
jpark37
2022-01-25 02:50:30 -08:00
committed by Jim
parent 9f41531541
commit 63db2265dc
3 changed files with 26 additions and 30 deletions

View File

@@ -77,6 +77,8 @@ static inline GLenum convert_gs_format(enum gs_color_format format)
return GL_BGRA;
case GS_BGRA_UNORM:
return GL_BGRA;
case GS_RG16:
return GL_RG;
case GS_UNKNOWN:
return 0;
}
@@ -129,6 +131,8 @@ static inline GLenum convert_gs_internal_format(enum gs_color_format format)
return GL_RGB;
case GS_BGRA_UNORM:
return GL_RGBA;
case GS_RG16:
return GL_RG16;
case GS_UNKNOWN:
return 0;
}
@@ -181,6 +185,8 @@ static inline GLenum get_gl_format_type(enum gs_color_format format)
return GL_UNSIGNED_BYTE;
case GS_BGRA_UNORM:
return GL_UNSIGNED_BYTE;
case GS_RG16:
return GL_UNSIGNED_SHORT;
case GS_UNKNOWN:
return 0;
}