2021-06-29 11:01:11 +04:30
|
|
|
#pragma once
|
|
|
|
|
2025-07-10 13:29:03 +03:30
|
|
|
#include <renderer/texture.hpp>
|
2021-07-29 17:12:13 +04:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
namespace lt {
|
2021-06-29 11:01:11 +04:30
|
|
|
|
2022-03-07 20:01:44 +03:30
|
|
|
class glTexture: public Texture
|
|
|
|
{
|
|
|
|
public:
|
2025-07-10 21:51:17 +03:30
|
|
|
glTexture(const Ref<Assets::TextureAsset> &asset);
|
2025-07-05 16:07:51 +03:30
|
|
|
|
2025-07-06 16:52:50 +03:30
|
|
|
~glTexture() override;
|
2021-06-29 11:01:11 +04:30
|
|
|
|
2025-07-05 15:36:53 +03:30
|
|
|
void bind(unsigned int slot = 0u) override;
|
2021-06-29 11:01:11 +04:30
|
|
|
|
2025-07-06 14:02:50 +03:30
|
|
|
auto get_texture() -> void * override;
|
2025-07-05 16:07:51 +03:30
|
|
|
|
|
|
|
private:
|
2025-07-10 21:51:17 +03:30
|
|
|
[[nodiscard]] auto map_num_components_to_format(uint32_t num_components) const -> int;
|
|
|
|
|
|
|
|
[[nodiscard]] auto map_num_components_to_internal_format(uint32_t num_components) const -> int;
|
|
|
|
|
|
|
|
uint32_t m_texture_id {};
|
2022-03-07 20:01:44 +03:30
|
|
|
};
|
2021-06-29 11:01:11 +04:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
} // namespace lt
|