mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibGL+LibGPU+LibSoftGPU: Add virtual base class for Images
This introduces a new device independent base class for Images in LibGPU that also keeps track of the device from which it was created in order to prevent assigning images across devices.
This commit is contained in:
parent
1f3642ed48
commit
4a99875582
8 changed files with 69 additions and 26 deletions
|
@ -8,7 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/RefCounted.h>
|
||||
#include <LibSoftGPU/Image.h>
|
||||
#include <LibGPU/Image.h>
|
||||
|
||||
namespace GL {
|
||||
|
||||
|
@ -21,11 +21,11 @@ public:
|
|||
virtual bool is_texture_3d() const { return false; }
|
||||
virtual bool is_cube_map() const { return false; }
|
||||
|
||||
RefPtr<SoftGPU::Image> device_image() { return m_device_image; }
|
||||
void set_device_image(RefPtr<SoftGPU::Image> image) { m_device_image = image; }
|
||||
RefPtr<GPU::Image> device_image() { return m_device_image; }
|
||||
void set_device_image(RefPtr<GPU::Image> image) { m_device_image = image; }
|
||||
|
||||
private:
|
||||
RefPtr<SoftGPU::Image> m_device_image;
|
||||
RefPtr<GPU::Image> m_device_image;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue