ladybird/Userland/Libraries/LibGL/Tex/Texture.h
Lenny Maiorani 4660b99ab7 Libraries: Use default constructors/destructors in LibGL
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-10 18:04:26 -08:00

31 lines
789 B
C++

/*
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCounted.h>
#include <LibSoftGPU/Image.h>
namespace GL {
class Texture : public RefCounted<Texture> {
public:
virtual ~Texture() = default;
virtual bool is_texture_1d() const { return false; }
virtual bool is_texture_2d() const { return false; }
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; }
private:
RefPtr<SoftGPU::Image> m_device_image;
};
}