#include <texture.h>
Public Types | |
enum | Wrap { WrapDefault, WrapBlack, WrapClamp, WrapPeriodic, WrapMirror, WrapLast } |
enum | MipMode { MipModeDefault, MipModeNoMIP, MipModeOneLevel, MipModeTrilinear, MipModeAniso } |
enum | InterpMode { InterpClosest, InterpBilinear, InterpBicubic, InterpSmartBicubic } |
Public Member Functions | |
TextureOptions () | |
TextureOptions (bool) | |
Static Public Member Functions | |
static Wrap | decode_wrapmode (const char *name) |
static void | parse_wrapmodes (const char *wrapmodes, TextureOptions::Wrap &swrapcode, TextureOptions::Wrap &twrapcode) |
Public Attributes | |
int | firstchannel |
First channel of the lookup. | |
int | nchannels |
Number of channels to look up. | |
Wrap | swrap |
Wrap mode in the s direction. | |
Wrap | twrap |
Wrap mode in the t direction. | |
MipMode | mipmode |
Mip mode. | |
InterpMode | interpmode |
Interpolation mode. | |
int | anisotropic |
Maximum anisotropic ratio. | |
bool | conservative_filter |
True == over-blur rather than alias. | |
VaryingRef< float > | sblur |
VaryingRef< float > | tblur |
Blur amount. | |
VaryingRef< float > | swidth |
VaryingRef< float > | twidth |
Multiplier for derivatives. | |
VaryingRef< float > | bias |
Bias. | |
VaryingRef< float > | fill |
Fill value for missing channels. | |
VaryingRef< int > | samples |
Number of samples. | |
float * | dresultds |
Gradient of the result along s (if not NULL). | |
float * | dresultdt |
Gradient of the result along t (if not NULL). | |
Wrap | zwrap |
Wrap mode in the z direction. | |
VaryingRef< float > | zblur |
Blur amount in the z direction. | |
VaryingRef< float > | zwidth |
Multiplier for derivatives in z direction. | |
Friends | |
class | OpenImageIO::pvt::TextureSystemImpl |
Encapsulate all the options needed for texture lookups. Making these options all separate parameters to the texture API routines is very ugly and also a big pain whenever we think of new options to add. So instead we collect all those little options into one structure that can just be passed by reference to the texture API routines.
Mip mode determines if/how we use mipmaps
Wrap mode describes what happens when texture coordinates describe a value outside the usual [0,1] range where a texture is defined.
OpenImageIO::TextureOptions::TextureOptions | ( | ) |
Create a TextureOptions with all fields initialized to reasonable defaults.
OpenImageIO::TextureOptions::TextureOptions | ( | bool | ) |
Special private ctr that makes a canonical default TextureOptions. For use internal to libtexture. Users, don't call this! Though, there is no harm. It's just not as efficient as the default ctr that memcpy's a canonical pre-constructed default.
static Wrap OpenImageIO::TextureOptions::decode_wrapmode | ( | const char * | name | ) | [static] |
Utility: Return the Wrap enum corresponding to a wrap name: "default", "black", "clamp", "periodic", "mirror".
static void OpenImageIO::TextureOptions::parse_wrapmodes | ( | const char * | wrapmodes, | |
TextureOptions::Wrap & | swrapcode, | |||
TextureOptions::Wrap & | twrapcode | |||
) | [static] |
Utility: Parse a single wrap mode (e.g., "periodic") or a comma-separated wrap modes string (e.g., "black,clamp") into separate Wrap enums for s and t.
Maximum anisotropic ratio.
Bias.
True == over-blur rather than alias.
Gradient of the result along s (if not NULL).
Gradient of the result along t (if not NULL).
Fill value for missing channels.
First channel of the lookup.
Interpolation mode.
Mip mode.
Number of channels to look up.
Number of samples.
Wrap mode in the s direction.
Blur amount.
Multiplier for derivatives.
Wrap mode in the t direction.
Blur amount in the z direction.
Multiplier for derivatives in z direction.
Wrap mode in the z direction.