Unravel Engine C++ Reference
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1#pragma once
2
3#include "handle_impl.h"
4#include <base/basetypes.hpp>
5#include <memory>
6
7namespace gfx
8{
9struct texture : public handle_impl<texture, texture_handle>
10{
11 //-----------------------------------------------------------------------------
12 // Name : Texture ()
18 //-----------------------------------------------------------------------------
19 texture() = default;
20
21 texture(const char* _path,
22 std::uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE,
23 std::uint8_t _skip = 0,
24 texture_info* _info = nullptr);
25
26 //-----------------------------------------------------------------------------
27 // Name : Texture ()
33 //-----------------------------------------------------------------------------
34 texture(std::uint16_t _width,
35 std::uint16_t _height,
36 bool _hasMips,
37 std::uint16_t _numLayers,
38 texture_format _format,
39 std::uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE,
40 const memory_view* _mem = nullptr);
41
42
43 //-----------------------------------------------------------------------------
44 // Name : Texture ()
50 //-----------------------------------------------------------------------------
51 texture(std::uint16_t _width,
52 std::uint16_t _height,
53 std::uint16_t _depth,
54 bool _hasMips,
55 texture_format _format,
56 std::uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE,
57 const memory_view* _mem = nullptr);
58
59 //-----------------------------------------------------------------------------
60 // Name : Texture ()
66 //-----------------------------------------------------------------------------
67 texture(std::uint16_t _size,
68 bool _hasMips,
69 std::uint16_t _numLayers,
70 texture_format _format,
71 std::uint64_t _flags = BGFX_TEXTURE_NONE | BGFX_SAMPLER_NONE,
72 const memory_view* _mem = nullptr);
73
74 //-----------------------------------------------------------------------------
75 // Name : get_size ()
81 //-----------------------------------------------------------------------------
82 auto get_size() const -> usize32_t;
83
84 //-----------------------------------------------------------------------------
85 // Name : is_render_target ()
91 //-----------------------------------------------------------------------------
92 auto is_render_target() const -> bool;
93
97 std::uint64_t flags = BGFX_TEXTURE_NONE;
98};
99} // namespace gfx
bgfx::TextureFormat::Enum texture_format
Definition format.h:10
bgfx::TextureInfo texture_info
Definition graphics.h:24
bgfx::Memory memory_view
Definition graphics.h:23
auto is_render_target() const -> bool
Definition texture.cpp:73
texture()=default
std::uint64_t flags
Creation flags.
Definition texture.h:97
auto get_size() const -> usize32_t
Definition texture.cpp:68
texture_info info
Texture detail info.
Definition texture.h:95