mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
libobs-opengl: Support texture creation from IOSurface using RGBA64Half
This commit is contained in:
@@ -495,6 +495,12 @@ gs_texture_t *device_texture_create_from_iosurface(gs_device_t *device, void *io
|
|||||||
texture_type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
texture_type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case kCVPixelFormatType_64RGBAHalf: {
|
||||||
|
color_format = GL_RGBA;
|
||||||
|
internal_format = GL_RGBA_FLOAT16_APPLE;
|
||||||
|
texture_type = GL_HALF_APPLE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
blog(LOG_ERROR, "Unexpected pixel format: %d (%c%c%c%c)", pixelFormat, pixelFormat >> 24, pixelFormat >> 16,
|
blog(LOG_ERROR, "Unexpected pixel format: %d (%c%c%c%c)", pixelFormat, pixelFormat >> 24, pixelFormat >> 16,
|
||||||
pixelFormat >> 8, pixelFormat);
|
pixelFormat >> 8, pixelFormat);
|
||||||
@@ -579,6 +585,7 @@ bool gs_texture_rebind_iosurface(gs_texture_t *texture, void *iosurf)
|
|||||||
switch (pixelFormat) {
|
switch (pixelFormat) {
|
||||||
case kCVPixelFormatType_ARGB2101010LEPacked:
|
case kCVPixelFormatType_ARGB2101010LEPacked:
|
||||||
case kCVPixelFormatType_32BGRA:
|
case kCVPixelFormatType_32BGRA:
|
||||||
|
case kCVPixelFormatType_64RGBAHalf:
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
blog(LOG_ERROR, "Invalid IOSurface Buffer");
|
blog(LOG_ERROR, "Invalid IOSurface Buffer");
|
||||||
|
|||||||
Reference in New Issue
Block a user