载入中...
搜索中...
未找到
eve::graphics::TextureSampler结构体 参考

Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine behaviour: linear, clamp, no mips, no aniso. 更多...

#include <TextureSampler.h>

Public 成员函数

bool operator== (const TextureSampler &) const =default
 Compare requested state without creating a backend sampler.
 

静态 Public 成员函数

static TextureSampler nearest ()
 Nearest.
 
static TextureSampler linear ()
 Linear.
 
static TextureSampler linearMipmap ()
 Trilinear (linear + linear mips). Caller should create the texture with generateMipmaps.
 
static TextureSampler anisotropic (float maxAniso=16.f)
 Trilinear + anisotropic filtering (capped by device limits at bind time).
 
static EVENGINE_API_BACKENDS FilterMode parseFilter (const char *name)
 Parse a filter name (nearest / linear, case-insensitive).
 
static EVENGINE_API_BACKENDS MipmapMode parseMipmap (const char *name)
 Parse a mipmap name (none / nearest / linear, case-insensitive).
 
static const char * filterName (FilterMode m)
 Stable filter spelling for logs and script bindings.
 
static const char * mipmapName (MipmapMode m)
 Stable mipmap-mode spelling for logs and script bindings.
 

Public 属性

FilterMode min = FilterMode::Linear
 
FilterMode mag = FilterMode::Linear
 
MipmapMode mipmap = MipmapMode::Disabled
 
bool repeatU = false
 
bool repeatV = false
 
bool repeatW = false
 
float maxAnisotropy = 1.f
 1 = off; values >1 enable anisotropic filtering when the device supports it.
 
float lodBias = 0.f
 
float minLod = 0.f
 
float maxLod = 1000.f
 Inclusive upper LOD clamp. Large values mean "use all available mips".
 

详细描述

Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine behaviour: linear, clamp, no mips, no aniso.

在文件 TextureSampler.h 第 24 行定义.

成员函数说明

◆ anisotropic()

static TextureSampler eve::graphics::TextureSampler::anisotropic ( float  maxAniso = 16.f)
inlinestatic

Trilinear + anisotropic filtering (capped by device limits at bind time).

在文件 TextureSampler.h 第 69 行定义.

引用了 linearMipmap() , 以及 s.

被这些函数引用 eve::graphics::TextureCreateInfo::withMipmaps().

◆ filterName()

static const char * eve::graphics::TextureSampler::filterName ( FilterMode  m)
inlinestatic

Stable filter spelling for logs and script bindings.

返回
Static non-owning "nearest" or "linear"; never null. @ownership Borrowed static storage; valid for the process lifetime. @lifetime Stable indefinitely.

在文件 TextureSampler.h 第 96 行定义.

引用了 m , 以及 eve::graphics::Nearest.

◆ linear()

◆ linearMipmap()

static TextureSampler eve::graphics::TextureSampler::linearMipmap ( )
inlinestatic

◆ mipmapName()

static const char * eve::graphics::TextureSampler::mipmapName ( MipmapMode  m)
inlinestatic

Stable mipmap-mode spelling for logs and script bindings.

返回
Static non-owning "none", "nearest", or "linear"; never null. @ownership Borrowed static storage; valid for the process lifetime. @lifetime Stable indefinitely.

在文件 TextureSampler.h 第 104 行定义.

引用了 eve::graphics::Disabled, m , 以及 eve::graphics::Nearest.

◆ nearest()

static TextureSampler eve::graphics::TextureSampler::nearest ( )
inlinestatic

◆ operator==()

bool eve::graphics::TextureSampler::operator== ( const TextureSampler &  ) const
default

Compare requested state without creating a backend sampler.

◆ parseFilter()

FilterMode eve::graphics::TextureSampler::parseFilter ( const char *  name)
static

Parse a filter name (nearest / linear, case-insensitive).

参数
nameBorrowed NUL-terminated spelling; nullptr treated as linear. @ownership Not retained; caller keeps ownership of the buffer. @lifetime Valid only for this call.

在文件 TextureSampler.cpp 第 23 行定义.

引用了 eve::graphics::Linear, name , 以及 eve::graphics::Nearest.

◆ parseMipmap()

MipmapMode eve::graphics::TextureSampler::parseMipmap ( const char *  name)
static

Parse a mipmap name (none / nearest / linear, case-insensitive).

参数
nameBorrowed NUL-terminated spelling; nullptr/empty means Disabled. @ownership Not retained; caller keeps ownership of the buffer. @lifetime Valid only for this call.

在文件 TextureSampler.cpp 第 28 行定义.

引用了 eve::graphics::Disabled, eve::graphics::Linear, name , 以及 eve::graphics::Nearest.

类成员变量说明

◆ lodBias

float eve::graphics::TextureSampler::lodBias = 0.f

在文件 TextureSampler.h 第 33 行定义.

◆ mag

FilterMode eve::graphics::TextureSampler::mag = FilterMode::Linear

在文件 TextureSampler.h 第 26 行定义.

◆ maxAnisotropy

float eve::graphics::TextureSampler::maxAnisotropy = 1.f

1 = off; values >1 enable anisotropic filtering when the device supports it.

在文件 TextureSampler.h 第 32 行定义.

◆ maxLod

float eve::graphics::TextureSampler::maxLod = 1000.f

Inclusive upper LOD clamp. Large values mean "use all available mips".

在文件 TextureSampler.h 第 36 行定义.

◆ min

FilterMode eve::graphics::TextureSampler::min = FilterMode::Linear

在文件 TextureSampler.h 第 25 行定义.

被这些函数引用 linear(), linearMipmap(), nearest() , 以及 eve::graphics::Graphics::setTextureSampler().

◆ minLod

float eve::graphics::TextureSampler::minLod = 0.f

在文件 TextureSampler.h 第 34 行定义.

◆ mipmap

MipmapMode eve::graphics::TextureSampler::mipmap = MipmapMode::Disabled

◆ repeatU

bool eve::graphics::TextureSampler::repeatU = false

◆ repeatV

bool eve::graphics::TextureSampler::repeatV = false

在文件 TextureSampler.h 第 29 行定义.

◆ repeatW

bool eve::graphics::TextureSampler::repeatW = false

在文件 TextureSampler.h 第 30 行定义.


该结构体的文档由以下文件生成: