Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
|
纹理. 更多...
#include <Texture.h>
Public 类型 | |
enum class | Filter { Nearest , Bilinear , Trilinear } |
enum class | Warp { Repeat , ClampToEdge , MirrorRepeat } |
enum class | Type { _2D , _3D , Cube } |
Public 成员函数 | |
virtual void | bind (uint32_t binding)=0 |
virtual void | set_min_filter (Filter filter)=0 |
设置缩小过滤方式. 更多... | |
virtual void | set_mag_filter (Filter filter)=0 |
设置放大过滤方式. 更多... | |
virtual void | set_s_warp (Warp warp)=0 |
设置 S 环绕方式. 更多... | |
virtual void | set_t_warp (Warp warp)=0 |
设置 T 环绕方式. 更多... | |
virtual void | set_r_warp (Warp warp)=0 |
设置 R 环绕方式. 更多... | |
Type | get_type () const |
获取纹理类型. | |
Format | get_format () const |
获取像素格式. | |
静态 Public 成员函数 | |
static std::shared_ptr< Texture > | create (const std::filesystem::path &path, Format fmt=Format::Unknown, uint32_t mipmapLevel=-1, Type type=Type::_2D) |
从图像文件创建纹理. 更多... | |
static std::shared_ptr< Texture > | create (const Image &image, Format fmt=Format::Unknown, uint32_t mipmapLevel=-1, Type type=Type::_2D) |
从图像创建纹理. 更多... | |
static std::shared_ptr< Texture > | create (const std::vector< Image > &images) |
从图像创建立方体纹理. 更多... | |
Protected 成员函数 | |
Texture (Type type, Format fmt) | |
Protected 属性 | |
Type | type_ |
Format | format_ |
静态 Protected 属性 | |
static std::unordered_map< std::filesystem::path, std::shared_ptr< Texture > > | cache_ |
纹理.
|
strong |
|
strong |
|
static |
从图像创建纹理.
image | 图像. |
fmt | 纹理格式. |
mipmapLevel | 多级渐远纹理等级. |
type | 纹理类型. |
|
static |
从图像文件创建纹理.
path | 图像文件路径. |
fmt | 纹理格式. |
mipmapLevel | 多级渐远纹理等级. |
type | 纹理类型. |
从图像创建立方体纹理.
images | 图像. |
type | 纹理类型. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinestaticprotected |
FIXME: