Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
texture.hpp
Go to the documentation of this file.
1
6
7
#pragma once
8
#include "
core_types.hpp
"
9
10
#include <memory>
11
#include <
toast/export.hpp
>
12
13
namespace
renderer {
14
class
VulkanTexture
;
15
}
16
17
namespace
assets {
18
22
class
TOAST_API Texture :
public
Asset {
23
public
:
24
explicit
Texture(std::vector<uint8_t> data);
25
~Texture()
override
;
26
27
[[nodiscard]]
28
auto
type()
const
-> std::string_view
override
{
29
return
"texture"
;
30
}
31
32
[[nodiscard]]
33
auto
gpuTexture()
const
->
const
renderer::VulkanTexture
&;
34
35
[[nodiscard]]
36
auto
gpuTexture() ->
renderer::VulkanTexture
&;
37
38
private
:
39
// No CPU-side copy of the encoded bytes
40
std::unique_ptr<renderer::VulkanTexture> m_gpu_texture;
41
};
42
}
renderer::VulkanTexture
Definition
vulkan_texture.hpp:16
core_types.hpp
Base types for the asset system.
export.hpp
engine
src
toast
assets
texture.hpp
Generated by
1.17.0