mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibGL+LibGPU+LibSoftGPU: Implement texture pixel format support
In OpenGL this is called the (base) internal format which is an expectation expressed by the client for the minimum supported texel storage format in the GPU for textures. Since we store everything as RGBA in a `FloatVector4`, the only thing we do in this patch is remember the expected internal format, and when we write new texels we fixate the value for the alpha channel to 1 for two formats that require it. `PixelConverter` has learned how to transform pixels during transfer to support this.
This commit is contained in:
parent
6c80d12111
commit
84c4b66721
13 changed files with 141 additions and 32 deletions
|
@ -16,5 +16,6 @@ namespace GL {
|
|||
|
||||
GPU::PixelType get_format_specification(GLenum format, GLenum type);
|
||||
ErrorOr<GPU::PixelType> get_validated_pixel_type(GLenum target, GLenum internal_format, GLenum format, GLenum type);
|
||||
GPU::PixelFormat pixel_format_for_internal_format(GLenum internal_format);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue