1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:27:34 +00:00

LibGL+LibGPU+LibSoftGPU: Implement GL_GENERATE_MIPMAP

We can now generate texture mipmaps on the fly if the client requests
it. This fixes the missing textures in our PrBoom+ port.
This commit is contained in:
Jelle Raaijmakers 2022-09-04 22:18:16 +02:00 committed by Linus Groh
parent dda5987684
commit 1540c56e6c
10 changed files with 148 additions and 82 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
* Copyright (c) 2022, Jelle Raaijmakers <jelle@gmta.nl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -21,6 +22,13 @@ public:
virtual ~Image() { }
virtual u32 width_at_level(u32 level) const = 0;
virtual u32 height_at_level(u32 level) const = 0;
virtual u32 depth_at_level(u32 level) const = 0;
virtual u32 number_of_levels() const = 0;
virtual void regenerate_mipmaps() = 0;
virtual void write_texels(u32 level, Vector3<i32> const& output_offset, void const* input_data, ImageDataLayout const&) = 0;
virtual void read_texels(u32 level, Vector3<i32> const& input_offset, void* output_data, ImageDataLayout const&) const = 0;
virtual void copy_texels(Image const& source, u32 source_level, Vector3<u32> const& source_offset, Vector3<u32> const& size, u32 destination_level, Vector3<u32> const& destination_offset) = 0;