1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:37:35 +00:00

LibGL+LibGPU+LibSoftGPU: Add virtual base class for devices

This adds a virtual base class for GPU devices located in LibGPU.
The OpenGL context now only talks to this device agnostic interface.

Currently the device interface is simply a copy of the existing SoftGPU
interface to get things going :^)
This commit is contained in:
Stephan Unverwerth 2022-03-27 16:49:15 +02:00 committed by Andreas Kling
parent 4a99875582
commit 211d24a218
4 changed files with 165 additions and 97 deletions

View file

@ -17,6 +17,7 @@
#include <LibGL/Tex/NameAllocator.h>
#include <LibGL/Tex/Texture.h>
#include <LibGL/Tex/TextureUnit.h>
#include <LibGPU/Device.h>
#include <LibGPU/DeviceInfo.h>
#include <LibGPU/Light.h>
#include <LibGPU/Vertex.h>
@ -24,8 +25,6 @@
#include <LibGfx/Matrix4x4.h>
#include <LibGfx/Rect.h>
#include <LibGfx/Vector3.h>
#include <LibSoftGPU/Clipper.h>
#include <LibSoftGPU/Device.h>
namespace GL {
@ -304,7 +303,7 @@ private:
return m_texture_coordinate_generation[texture_unit][capability - GL_TEXTURE_GEN_S];
}
SoftGPU::Device m_rasterizer;
NonnullOwnPtr<GPU::Device> m_rasterizer;
GPU::DeviceInfo const m_device_info;
bool m_sampler_config_is_dirty { true };
bool m_light_state_is_dirty { true };