1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibGL+LibGPU+LibSoftGPU: Implement glCopyTex(Sub)?Image2d

These two methods copy from the frame buffer to (part of) a texture.
This commit is contained in:
Jelle Raaijmakers 2022-09-04 20:02:37 +02:00 committed by Linus Groh
parent d7f1dc146e
commit 44953a4301
7 changed files with 118 additions and 22 deletions

View file

@ -95,10 +95,14 @@ ErrorOr<GPU::PixelType> get_validated_pixel_type(GLenum target, GLenum internal_
&& internal_format != GL_SRGB8_ALPHA8)
return Error::from_errno(GL_INVALID_ENUM);
if ((format < GL_COLOR_INDEX || format > GL_LUMINANCE_ALPHA) && format != GL_BGR && format != GL_BGRA)
if (format != GL_NONE
&& (format < GL_COLOR_INDEX || format > GL_LUMINANCE_ALPHA)
&& format != GL_BGR
&& format != GL_BGRA)
return Error::from_errno(GL_INVALID_ENUM);
if (type != GL_BITMAP
if (type != GL_NONE
&& type != GL_BITMAP
&& (type < GL_BYTE || type > GL_FLOAT)
&& type != GL_HALF_FLOAT
&& (type < GL_UNSIGNED_BYTE_3_3_2 || type > GL_UNSIGNED_INT_10_10_10_2)